Download the PHP package roslov/laravel-migration-checker without Composer

On this page you can find all versions of the php package roslov/laravel-migration-checker. 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-checker

Database Migration Checker For Laravel

Latest Stable Version Total Downloads License PHP Version Require

This package validates Laravel database migrations by ensuring every pending migration can be applied and rolled back without leaving schema differences. It is a Laravel wrapper around Migration Checker and integrates directly with Artisan, so you can use it as part of your local workflow or CI.

The checker runs migrations one by one:

  1. Creates the migrations table if needed.
  2. Takes a schema snapshot.
  3. Applies the next pending migration.
  4. Rolls the migration back.
  5. Compares the schema dump to the original state.

If the schema differs, the command fails and prints a diff so you can pinpoint what was left behind.

Requirements

Supported database types and versions

This bundle supports MySQL, MariaDB, PostgreSQL, and others.

See all supported database types and versions in the Migration Checker documentation.

Limitations

The console command migration-checker:check runs only in the test environment to avoid accidentally affecting the working database. Therefore, it should always be used with the option --env=testing.

The command checks only pending migrations and executes them one at a time. It uses the migration paths in database/migrations and database/settings by default.

Installation

The package can be installed with Composer:

General usage

1. Ensure a clean test database

Run the checker against a disposable database. It must be empty, so the schema snapshot reflects only what your migrations create.

2. Run the checker

You can run the command to check your migrations in the test environment:

By default, the command searches for migrations in such folders:

But you can add extra paths. For example, if there are some vendors that add their migrations. Use --extra-path for this:

Be careful to run it in the test environment, otherwise you can damage your data.

You can target a specific connection if you have multiple databases configured:

3. Review output

The output example of the successful run:

The output example of the failed run:

If you want to run it in your CI, you can do something like this:

Testing

Unit testing

The package is tested with PHPUnit. To run tests:

inside a container, or

from the host machine.

Code style analysis

The code style is analyzed with PHP_CodeSniffer and PSR-12 Ext coding standard. To run code style analysis:

inside a container, or

from the host machine.

Static analysis

Static analysis is performed with PHPStan. To run it:

inside a container, or

from the host machine.

All validations

To run all validations at once (syntax check, code style, static analysis, and Rector):


All versions of laravel-migration-checker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
roslov/migration-checker Version ^1.0
sebastian/diff Version ^5.0|^6.0|^7.0|^8.0
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 roslov/laravel-migration-checker contains the following files

Loading the files please wait ...