Skip to content

Commit

Permalink
Merge pull request #1827 from Zarthus/backport-2.2-issue-1725
Browse files Browse the repository at this point in the history
Backport #1725 into 2.2 branch.
  • Loading branch information
dunglas committed Apr 9, 2018
2 parents 9943760 + 97f8bc9 commit 905ac01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Expand Up @@ -468,7 +468,7 @@ private function registerBundlesConfiguration(array $bundles, array $config, Xml
private function registerCacheConfiguration(ContainerBuilder $container)
{
// Don't use system cache pool in dev
if (!$container->getParameter('kernel.debug')) {
if ($container->hasParameter('api_platform.metadata_cache') ? $container->getParameter('api_platform.metadata_cache') : !$container->getParameter('kernel.debug')) {
return;
}

Expand Down
Expand Up @@ -710,6 +710,9 @@ private function getBaseContainerBuilderProphecy()
$containerBuilderProphecy->setAlias($alias, $service)->shouldBeCalled();
}

$containerBuilderProphecy->hasParameter('api_platform.metadata_cache')->willReturn(true)->shouldBeCalled();
$containerBuilderProphecy->getParameter('api_platform.metadata_cache')->willReturn(true)->shouldBeCalled();

return $containerBuilderProphecy;
}
}
2 changes: 2 additions & 0 deletions tests/Fixtures/app/config/config_test.yml
Expand Up @@ -73,6 +73,8 @@ fos_user:
parameters:
container.autowiring.strict_mode: true
container.dumper.inline_class_loader: true
# Enable the metadata cache to speedup the builds
api_platform.metadata_cache: true

services:
contain_non_resource.item_data_provider:
Expand Down

0 comments on commit 905ac01

Please sign in to comment.