PHP code example of petrknap / doctrine-migrationscontinuity

1. Go to this page and download the library: Download petrknap/doctrine-migrationscontinuity library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

petrknap / doctrine-migrationscontinuity example snippets


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