Download the PHP package sufyandev/laravel-migration-linter without Composer

On this page you can find all versions of the php package sufyandev/laravel-migration-linter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-migration-linter

🧩 Laravel Migration Linter

Docs Migration Linter Latest Version on Packagist Total Downloads

A lightweight Laravel package that analyzes your database migrations and warns you about risky schema changes β€” before they reach production.


πŸš€ Features

πŸ“˜ Read full rule docs:
πŸ‘‰ https://muhammad-sufyan5.github.io/sufyan-laravel-migration-lint-package/


πŸ“¦ Installation

Install via Composer:

The package will auto-register via Laravel’s package discovery.


🧩 Usage

Run the built-in Artisan command to lint all migration files:

Common Options

Option Description
--json Output structured JSON (great for CI)
--html= Generate interactive HTML report (default: storage/app/...)
--path= Lint a specific migration file/folder
--baseline Use a custom baseline file
--generate-baseline Create a baseline to ignore current issues
--rules View all rules and their enabled status
--summary Display summary footer in output
--no-suggestions Hide suggestions (show only warnings table)

Example Usage

Lint all migrations and export JSON:

Generate a new baseline file (ignore current issues):

Sample warning output:


πŸ“‹ Scope & Limitations

What We Analyze

βœ… Laravel Schema Builder Operations β€” All $table-> method calls
βœ… Schema::create() and Schema::table() methods
βœ… Column modifications via ->change()
βœ… Foreign keys, indexes, constraints, timestamps

What We Don't Analyze (By Design)

⚠️ Raw SQL queries (DB::statement(), DB::raw(), etc.)
⚠️ Direct Eloquent operations (User::update(), model factories)
⚠️ Model traits and properties
⚠️ Data seeding operations

Reason: The linter focuses on statically analyzing schema builder patterns, which represent 99% of migration files. Raw SQL analysis requires different tooling.

βš™οΈ Configuration

You can publish the configuration file to customize rule settings:

The config file (config/migration-linter.php) allows you to:

Example configuration:


🧾 CI/CD Integration (GitHub Actions)


✨ What's New in v2.0.0

Complete SOLID Principles Refactoring

Migration from v1.4.0: All commands work exactly the same. No changes needed:


✨ What Was New in v1.4.0

πŸ§‘β€πŸ’» Contributing

Contributions are welcome! If you have an idea for a useful rule or enhancement, feel free to open a PR or issue.


🧾 License

Released under the MIT License. Β© 2025 Sufyan. All rights reserved.


🧠 Author

Muhammad Sufyan πŸ“§ [email protected] πŸ™ GitHub: @muhammad-sufyan5

β€œSmart developers don’t debug production β€” they lint migrations.”

πŸ“˜ Full Documentation:
πŸ‘‰ https://muhammad-sufyan5.github.io/sufyan-laravel-migration-lint-package/


All versions of laravel-migration-linter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sufyandev/laravel-migration-linter contains the following files

Loading the files please wait ...