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.
<?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'));
}
}
// ...
}
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.