File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/Bridge/Symfony/Bundle/DependencyInjection
tests/Bridge/Symfony/Bundle/DependencyInjection Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 14
14
namespace ApiPlatform \Core \Bridge \Symfony \Bundle \DependencyInjection ;
15
15
16
16
use ApiPlatform \Core \Api \FilterInterface ;
17
+ use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \EagerLoadingExtension ;
18
+ use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \FilterEagerLoadingExtension ;
17
19
use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \QueryCollectionExtensionInterface ;
18
20
use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \QueryItemExtensionInterface ;
19
21
use ApiPlatform \Core \DataProvider \CollectionDataProviderInterface ;
@@ -412,7 +414,9 @@ private function registerDoctrineExtensionConfiguration(ContainerBuilder $contai
412
414
return ;
413
415
}
414
416
417
+ $ container ->removeAlias (EagerLoadingExtension::class);
415
418
$ container ->removeDefinition ('api_platform.doctrine.orm.query_extension.eager_loading ' );
419
+ $ container ->removeAlias (FilterEagerLoadingExtension::class);
416
420
$ container ->removeDefinition ('api_platform.doctrine.orm.query_extension.filter_eager_loading ' );
417
421
}
418
422
Original file line number Diff line number Diff line change @@ -275,6 +275,8 @@ public function testDisableEagerLoadingExtension()
275
275
{
276
276
$ containerBuilderProphecy = $ this ->getBaseContainerBuilderProphecy ();
277
277
$ containerBuilderProphecy ->setParameter ('api_platform.eager_loading.enabled ' , false )->shouldBeCalled ();
278
+ $ containerBuilderProphecy ->removeAlias ('ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\EagerLoadingExtension ' )->shouldBeCalled ();
279
+ $ containerBuilderProphecy ->removeAlias ('ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\FilterEagerLoadingExtension ' )->shouldBeCalled ();
278
280
$ containerBuilderProphecy ->removeDefinition ('api_platform.doctrine.orm.query_extension.eager_loading ' )->shouldBeCalled ();
279
281
$ containerBuilderProphecy ->removeDefinition ('api_platform.doctrine.orm.query_extension.filter_eager_loading ' )->shouldBeCalled ();
280
282
$ containerBuilder = $ containerBuilderProphecy ->reveal ();
You can’t perform that action at this time.
0 commit comments