2022-11-03 10:44:05 -04:00
|
|
|
<?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],
|
2022-11-17 15:32:57 -05:00
|
|
|
'logging' => '%kernel.debug%',
|
2022-11-03 10:44:05 -04:00
|
|
|
'mapping_types' => ['bit' => 'boolean', 'money' => 'money'],
|
2023-07-21 10:35:15 -04:00
|
|
|
'url' => '%env(DATABASE_URL)%',
|
2022-11-03 10:44:05 -04:00
|
|
|
],
|
|
|
|
'orm' => [
|
|
|
|
'auto_generate_proxy_classes' => '%kernel.debug%',
|
|
|
|
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',
|
|
|
|
'auto_mapping' => TRUE,
|
2024-03-27 16:23:08 -04:00
|
|
|
'enable_lazy_ghost_objects' => TRUE,
|
2022-11-03 10:44:05 -04:00
|
|
|
'mappings' => [
|
|
|
|
'App' => [
|
|
|
|
'is_bundle' => FALSE,
|
|
|
|
'type' => 'attribute',
|
|
|
|
'dir' => '%kernel.project_dir%/src/Entity',
|
|
|
|
'prefix' => 'App\Entity',
|
2023-07-21 10:35:15 -04:00
|
|
|
'alias' => 'App'],
|
|
|
|
],
|
2024-03-27 16:23:08 -04:00
|
|
|
'controller_resolver' => [
|
|
|
|
'auto_mapping' => true,
|
2024-05-28 18:44:29 -04:00
|
|
|
],
|
2023-07-21 10:35:15 -04:00
|
|
|
],
|
2022-11-03 10:44:05 -04:00
|
|
|
]);
|
|
|
|
};
|