diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 34de43d07fda0..3f1845dd8f7db 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -998,7 +998,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $cacheMetadataFactory = new Definition( CacheClassMetadataFactory::class, array( - new Reference('serializer.mapping.class_metadata_factory.inner'), + new Reference('serializer.mapping.cache_class_metadata_factory.inner'), new Reference('cache.pool.serializer'), ) ); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php new file mode 100644 index 0000000000000..423d673be2f96 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +/** + * Checks that the container compiles correctly when all the bundle features are enabled. + */ +class ContainerDumpTest extends WebTestCase +{ + public function testContainerCompilationInDebug() + { + $client = $this->createClient(array('test_case' => 'ContainerDump', 'root_config' => 'config.yml')); + + $this->assertTrue($client->getContainer()->has('serializer')); + } + + public function testContainerCompilation() + { + $client = $this->createClient(array('test_case' => 'ContainerDump', 'root_config' => 'config.yml', 'debug' => false)); + + $this->assertTrue($client->getContainer()->has('serializer')); + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php new file mode 100644 index 0000000000000..a73987bcc986a --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml new file mode 100644 index 0000000000000..29f1e32ff964f --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml @@ -0,0 +1,21 @@ +imports: + - { resource: ../config/default.yml } + +framework: + esi: true + ssi: true + fragments: true + profiler: true + router: true + session: true + request: true + templating: + enabled: true + engines: ['php'] + assets: true + translator: true + validation: true + serializer: true + property_info: true + csrf_protection: true + form: true