File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Autocomplete/tests/Fixtures
LiveComponent/tests/Fixtures Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ protected function configureContainer(ContainerConfigurator $c): void
113113 $ doctrineConfig = [
114114 'dbal ' => ['url ' => '%env(resolve:DATABASE_URL)% ' ],
115115 'orm ' => [
116+ 'auto_mapping ' => true ,
116117 'mappings ' => [
117118 'Test ' => [
118119 'is_bundle ' => false ,
Original file line number Diff line number Diff line change 1313
1414use Composer \InstalledVersions ;
1515use Doctrine \Bundle \DoctrineBundle \DoctrineBundle ;
16+ use Doctrine \ORM \Mapping \AssociationMapping ;
1617use Psr \Log \NullLogger ;
1718use Symfony \Bundle \FrameworkBundle \FrameworkBundle ;
1819use Symfony \Bundle \FrameworkBundle \Kernel \MicroKernelTrait ;
@@ -162,6 +163,7 @@ protected function configureContainer(ContainerConfigurator $c): void
162163 'url ' => '%env(resolve:DATABASE_URL)% ' ,
163164 ],
164165 'orm ' => [
166+ 'auto_mapping ' => true ,
165167 'mappings ' => [
166168 'Default ' => [
167169 'is_bundle ' => false ,
@@ -184,7 +186,10 @@ protected function configureContainer(ContainerConfigurator $c): void
184186 if (null !== $ doctrineBundleVersion = InstalledVersions::getVersion ('doctrine/doctrine-bundle ' )) {
185187 if (version_compare ($ doctrineBundleVersion , '3.0.0 ' , '< ' )) {
186188 $ doctrineConfig ['orm ' ]['auto_generate_proxy_classes ' ] = true ;
187- $ doctrineConfig ['orm ' ]['controller_resolver ' ]['auto_mapping ' ] = true ;
189+
190+ if (class_exists (AssociationMapping::class)) {
191+ $ doctrineConfig ['orm ' ]['controller_resolver ' ]['auto_mapping ' ] = true ;
192+ }
188193
189194 if (version_compare ($ doctrineBundleVersion , '2.8.0 ' , '>= ' )) {
190195 $ doctrineConfig ['orm ' ]['enable_lazy_ghost_objects ' ] = true ;
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ protected function configureContainer(ContainerConfigurator $container): void
8484 'url ' => 'sqlite:///%kernel.project_dir%/var/turbo.db ' ,
8585 ],
8686 'orm ' => [
87+ 'auto_mapping ' => true ,
8788 'mappings ' => [
8889 'App ' => [
8990 'is_bundle ' => false ,
You can’t perform that action at this time.
0 commit comments