File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 9090 },
9191 "require-dev" : {
9292 "doctrine/dbal" : " ^3.8|^4.0" ,
93- "doctrine/doctrine-bundle" : " ^2.12 " ,
93+ "doctrine/doctrine-bundle" : " ^2.18.1|^3.0 " ,
9494 "doctrine/orm" : " ^2.14|^3.0" ,
9595 "doctrine/persistence" : " ^3.1|^4.0" ,
9696 "matthiasnoback/symfony-dependency-injection-test" : " ^5.1|^6.0" ,
Original file line number Diff line number Diff line change @@ -101,8 +101,6 @@ doctrine:
101101
102102 url : ' %env(resolve:DATABASE_URL)%'
103103 orm :
104- enable_lazy_ghost_objects : true
105- auto_generate_proxy_classes : true
106104 naming_strategy : doctrine.orm.naming_strategy.underscore_number_aware
107105 auto_mapping : true
108106 controller_resolver :
Original file line number Diff line number Diff line change 44
55namespace Webauthn \Tests \Bundle \Functional ;
66
7+ use Composer \InstalledVersions ;
8+ use Composer \Semver \VersionParser ;
79use Doctrine \Bundle \DoctrineBundle \DoctrineBundle ;
810use Symfony \Bundle \FrameworkBundle \FrameworkBundle ;
911use Symfony \Bundle \MonologBundle \MonologBundle ;
@@ -38,5 +40,22 @@ public function registerBundles(): iterable
3840 public function registerContainerConfiguration (LoaderInterface $ loader ): void
3941 {
4042 $ loader ->load (__DIR__ . '/../config/config.yml ' );
43+
44+ $ loader ->load (function ($ container ) {
45+ $ isDoctrineBundle2 = InstalledVersions::satisfies (
46+ new VersionParser (),
47+ 'doctrine/doctrine-bundle ' ,
48+ '^2.0 '
49+ );
50+
51+ if ($ isDoctrineBundle2 ) {
52+ $ container ->loadFromExtension ('doctrine ' , [
53+ 'orm ' => [
54+ 'enable_lazy_ghost_objects ' => true ,
55+ 'auto_generate_proxy_classes ' => true ,
56+ ],
57+ ]);
58+ }
59+ });
4160 }
4261}
You can’t perform that action at this time.
0 commit comments