upd: symfony/config

This commit is contained in:
2026-03-26 08:26:06 -04:00
parent 26b9e6fe97
commit d12b94b4b1
2 changed files with 41 additions and 15 deletions

View File

@@ -1,29 +1,49 @@
doctrine: doctrine:
dbal: dbal:
url: '%env(resolve:DATABASE_URL)%' connections:
default:
url: '%env(resolve:DATABASE_URL)%'
profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
transfer:
url: '%env(default::XFER_DATABASE_URL)%'
profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
# IMPORTANT: You MUST configure your server version, # IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file) # either here or in the DATABASE_URL env var (see .env file)
#server_version: '16' #server_version: '16'
profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
orm: orm:
auto_generate_proxy_classes: true auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true enable_lazy_ghost_objects: true
report_fields_where_declared: true # report_fields_where_declared: true
validate_xml_mapping: true # validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware # auto_mapping: true
auto_mapping: true default_entity_manager: default
mappings: entity_managers:
App: default:
type: attribute connection: default
is_bundle: false naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
dir: '%kernel.project_dir%/src/Entity' mappings:
prefix: 'App\Entity' App:
alias: App type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
transfer:
connection: transfer
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
controller_resolver: controller_resolver:
auto_mapping: true auto_mapping: false
when@test: when@test:
doctrine: doctrine:
@@ -50,3 +70,6 @@ when@prod:
adapter: cache.app adapter: cache.app
doctrine.system_cache_pool: doctrine.system_cache_pool:
adapter: cache.system adapter: cache.system
parameters:
env(default_url): ''

View File

@@ -22,3 +22,6 @@ services:
# add more service definitions when explicit configuration is needed # add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones # please note that last definitions always *replace* previous ones
App\Service\DatabaseTransferService:
arguments:
$projectDir: '%kernel.project_dir%'