addCompilerPass(new class () implements CompilerPassInterface { public function process(ContainerBuilder $container): void { $container->getDefinition('doctrine.orm.default_configuration') ->addMethodCall( 'setIdentityGenerationPreferences', [ [ PostgreSQLPlatform::class => ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE, ], ] ); } }); } }