35 lines
943 B
PHP
35 lines
943 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
use App\Types\MoneyType;
|
||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||
|
|
||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||
|
$parameters = $containerConfigurator->parameters();
|
||
|
|
||
|
$parameters->set('env(DATABASE_URL)', '');
|
||
|
|
||
|
$containerConfigurator->extension('doctrine', [
|
||
|
'dbal' => [
|
||
|
'driver' => 'pdo_pgsql',
|
||
|
'types' => ['money' => MoneyType::class],
|
||
|
'mapping_types' => ['bit' => 'boolean', 'money' => 'money'],
|
||
|
'url' => '%env(DATABASE_URL)%'
|
||
|
],
|
||
|
'orm' => [
|
||
|
'auto_generate_proxy_classes' => '%kernel.debug%',
|
||
|
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',
|
||
|
'auto_mapping' => TRUE,
|
||
|
'mappings' => [
|
||
|
'App' => [
|
||
|
'is_bundle' => FALSE,
|
||
|
'type' => 'attribute',
|
||
|
'dir' => '%kernel.project_dir%/src/Entity',
|
||
|
'prefix' => 'App\Entity',
|
||
|
'alias' => 'App']
|
||
|
]
|
||
|
]
|
||
|
]);
|
||
|
};
|