Files
Mangarr/src/Kernel.php
ext.jeremy.guillot@maxicoffee.domains c55cd62ec7 fix: phpcs-fixer
2025-02-05 21:32:04 +01:00

36 lines
1.1 KiB
PHP

<?php
namespace App;
use Override;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
#[Override]
protected function build(ContainerBuilder $container): void
{
$container->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,
],
]
);
}
});
}
}