core-bundle/src/DependencyInjection/Compiler/DoctrineMigrationsPass.php
public function process(ContainerBuilder $container): void
    {
        if (!$this->hasMigrationsBundle($container)) {
            return;
        }

        $provider = new Definition(MigrationsSchemaProvider::class);
        $provider->addArgument(new Reference('contao.framework'));
        $provider->addArgument(new Reference('doctrine'));

        $command = new Definition(DoctrineMigrationsDiffCommand::class);
        $command->setArguments([$provider]);
        $command->addTag('console.command');
        $command->setPublic(true);

        $container->setDefinition(DoctrineMigrationsDiffCommand::COMMAND_ID, $command);

        // Required if Symfony's compiler pass has already handled the "console.command" tags
        if ($container->hasParameter('console.command.ids')) {
            $ids = $container->getParameter('console.command.ids');
            $ids[] = DoctrineMigrationsDiffCommand::COMMAND_ID;

            $container->setParameter('console.command.ids', $ids);
        }
    }
public function process(ContainerBuilder $container): void
    {
        if (!$this->hasMigrationsBundle($container)) {
            return;
        }

        $provider = new Definition(MigrationsSchemaProvider::class);
        $provider->addArgument(new Reference('contao.framework'));
        $provider->addArgument(new Reference('doctrine'));

        $command = new Definition(DoctrineMigrationsDiffCommand::class);
        $command->setArguments([$provider]);
        $command->addTag('console.command');
        $command->setPublic(true);

        $container->setDefinition(DoctrineMigrationsDiffCommand::COMMAND_ID, $command);

        // Required if Symfony's compiler pass has already handled the "console.command" tags
        if ($container->hasParameter('console.command.ids')) {
            $ids = $container->getParameter('console.command.ids');
            $ids[] = DoctrineMigrationsDiffCommand::COMMAND_ID;

            $container->setParameter('console.command.ids', $ids);
        }
    }
public function process ( ContainerBuilder $ container ) : void { if ( ! $ this -> hasMigrationsBundle ( $ container ) ) { return ; } $ provider = new Definition ( MigrationsSchemaProvider :: class ) ; $ provider -> addArgument ( new Reference ( 'contao.framework' ) ) ; $ provider -> addArgument ( new Reference ( 'doctrine' ) ) ; $ command = new Definition ( DoctrineMigrationsDiffCommand :: class ) ; $ command -> setArguments ( [ $ provider ] ) ; $ command -> addTag ( 'console.command' ) ; $ command -> setPublic ( true ) ; $ container -> setDefinition ( DoctrineMigrationsDiffCommand :: COMMAND_ID , $ command ) ; // Required if Symfony's compiler pass has already handled the "console.command" tags if ( $ container -> hasParameter ( 'console.command.ids' ) ) { $ ids = $ container -> getParameter ( 'console.command.ids' ) ; $ ids [ ] = DoctrineMigrationsDiffCommand :: COMMAND_ID ; $ container -> setParameter ( 'console.command.ids' , $ ids ) ; } }
{@inheritdoc}
{