26 lines
835 B
PHP
Executable File
26 lines
835 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use PSC\Libraries\DoctrineBundle\ORM\Query\AST\Functions\SimpleFunction;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
$containerConfigurator->extension('doctrine', [
|
|
'dbal' => [
|
|
'url' => '%env(resolve:DATABASE_URL)%',
|
|
'charset' => 'utf8mb4',
|
|
'default_table_options' => ['collate' => 'utf8mb4_unicode_ci'],
|
|
],
|
|
'orm' => [
|
|
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',
|
|
'auto_mapping' => true,
|
|
'dql' => [
|
|
'numeric_functions' => [
|
|
'month' => SimpleFunction::class,
|
|
],
|
|
],
|
|
],
|
|
]);
|
|
};
|