petrknap / doctrine-migrationscontinuity
Continuity checker for Doctrine Migrations
v1.1.0
2020-08-11 17:56 UTC
Requires
- php: >=7.2
- doctrine/migrations: ^3.0
Requires (Dev)
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-11-18 19:19:23 UTC
README
Implemented as external event subscriber due to doctrine/migrations#1036.
Don't forget to follow documentation to register this subscriber.
You can use helper ContinuityChecker::init
to do this.
Symfony
<?php // src/Kernel.php // ... use PetrKnap\Doctrine\MigrationsContinuity\ContinuityChecker; // ... class Kernel extends BaseKernel { // ... public function boot(): void { parent::boot(); // ... if (in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { ContinuityChecker::init($this->container->get('doctrine.dbal.default_connection')); } } // ... }
How to install
Run composer require petrknap/doctrine-migrationscontinuity
or merge this JSON code with your project composer.json
file manually and run composer install
. Instead of dev-master
you can use one of released versions.
{ "require": { "petrknap/doctrine-migrationscontinuity": "dev-master" } }
Or manually clone this repository via git clone https://github.com/petrknap/doctrine-migrationscontinuity.git
or download this repository as ZIP and extract files into your project.