@@ -151,6 +151,9 @@ protected function configureContainer(ContainerConfigurator $c): void
151
151
],
152
152
'orm ' => [
153
153
'auto_generate_proxy_classes ' => true ,
154
+ 'enable_lazy_ghost_objects ' => true ,
155
+ 'report_fields_where_declared ' => true ,
156
+ 'validate_xml_mapping ' => true ,
154
157
'auto_mapping ' => true ,
155
158
'mappings ' => [
156
159
'Default ' => [
@@ -168,22 +171,13 @@ protected function configureContainer(ContainerConfigurator $c): void
168
171
'alias ' => 'XML ' ,
169
172
],
170
173
],
174
+ 'controller_resolver ' => [
175
+ 'auto_mapping ' => false ,
176
+ ],
171
177
],
172
178
];
173
179
174
180
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
- }
187
181
if (\PHP_VERSION_ID >= 80400 && version_compare ($ doctrineBundleVersion , '2.15.0 ' , '>= ' )) {
188
182
$ doctrineConfig ['orm ' ]['enable_native_lazy_objects ' ] = true ;
189
183
}
0 commit comments