@@ -151,6 +151,9 @@ protected function configureContainer(ContainerConfigurator $c): void
151151 ],
152152 'orm ' => [
153153 'auto_generate_proxy_classes ' => true ,
154+ 'enable_lazy_ghost_objects ' => true ,
155+ 'report_fields_where_declared ' => true ,
156+ 'validate_xml_mapping ' => true ,
154157 'auto_mapping ' => true ,
155158 'mappings ' => [
156159 'Default ' => [
@@ -168,22 +171,13 @@ protected function configureContainer(ContainerConfigurator $c): void
168171 'alias ' => 'XML ' ,
169172 ],
170173 ],
174+ 'controller_resolver ' => [
175+ 'auto_mapping ' => false ,
176+ ],
171177 ],
172178 ];
173179
174180 if (null !== $ doctrineBundleVersion = InstalledVersions::getVersion ('doctrine/doctrine-bundle ' )) {
175- if (version_compare ($ doctrineBundleVersion , '2.8.0 ' , '>= ' )) {
176- $ doctrineConfig ['orm ' ]['enable_lazy_ghost_objects ' ] = true ;
177- }
178- // https://github.com/doctrine/DoctrineBundle/pull/1661
179- if (version_compare ($ doctrineBundleVersion , '2.9.0 ' , '>= ' )) {
180- $ doctrineConfig ['orm ' ]['report_fields_where_declared ' ] = true ;
181- $ doctrineConfig ['orm ' ]['validate_xml_mapping ' ] = true ;
182- $ doctrineConfig ['dbal ' ]['schema_manager_factory ' ] = 'doctrine.dbal.default_schema_manager_factory ' ;
183- }
184- if (version_compare ($ doctrineBundleVersion , '2.12.0 ' , '>= ' )) {
185- $ doctrineConfig ['orm ' ]['controller_resolver ' ]['auto_mapping ' ] = false ;
186- }
187181 if (\PHP_VERSION_ID >= 80400 && version_compare ($ doctrineBundleVersion , '2.15.0 ' , '>= ' )) {
188182 $ doctrineConfig ['orm ' ]['enable_native_lazy_objects ' ] = true ;
189183 }
0 commit comments