@@ -190,18 +190,28 @@ protected function configureContainer(ContainerConfigurator $c): void
190190 if (version_compare ($ doctrineBundleVersion , '2.8.0 ' , '>= ' )) {
191191 $ doctrineConfig ['orm ' ]['enable_lazy_ghost_objects ' ] = true ;
192192 }
193+
194+ // https://github.com/doctrine/DoctrineBundle/pull/1661
195+ if (version_compare ($ doctrineBundleVersion , '2.9.0 ' , '>= ' )) {
196+ $ doctrineConfig ['orm ' ]['report_fields_where_declared ' ] = true ;
197+ }
198+
193199 if (version_compare ($ doctrineBundleVersion , '2.12.0 ' , '>= ' )) {
194200 $ doctrineConfig ['orm ' ]['controller_resolver ' ]['auto_mapping ' ] = false ;
195201 }
196202 }
197203
198204 // https://github.com/doctrine/DoctrineBundle/pull/1661
199205 if (version_compare ($ doctrineBundleVersion , '2.9.0 ' , '>= ' )) {
200- $ doctrineConfig ['orm ' ]['report_fields_where_declared ' ] = true ;
201206 $ doctrineConfig ['orm ' ]['validate_xml_mapping ' ] = true ;
202207 $ doctrineConfig ['dbal ' ]['schema_manager_factory ' ] = 'doctrine.dbal.default_schema_manager_factory ' ;
208+
209+ if (version_compare ($ doctrineBundleVersion , '3.0.0 ' , '< ' )) {
210+ $ doctrineConfig ['orm ' ]['report_fields_where_declared ' ] = true ;
211+ }
203212 }
204- if (\PHP_VERSION_ID >= 80400 && version_compare ($ doctrineBundleVersion , '2.15.0 ' , '>= ' )) {
213+
214+ if (\PHP_VERSION_ID >= 80400 && version_compare ($ doctrineBundleVersion , '2.15.0 ' , '>= ' ) && version_compare ($ doctrineBundleVersion , '4.0.0 ' , '< ' )) {
205215 $ doctrineConfig ['orm ' ]['enable_native_lazy_objects ' ] = true ;
206216 }
207217 }
0 commit comments