diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php
index 6467965da4848..67aa34cf5bac4 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php
@@ -29,9 +29,7 @@ class CachePoolClearerPassTest extends TestCase
public function testPoolRefsAreWeak()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.project_dir', 'foo');
$globalClearer = new Definition(Psr6CacheClearer::class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php
index fe5e1469b08fd..273329b1826c7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php
@@ -34,9 +34,7 @@ protected function setUp()
public function testNamespaceArgumentIsReplaced()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.project_dir', 'foo');
$adapter = new Definition();
$adapter->setAbstract(true);
@@ -50,13 +48,12 @@ public function testNamespaceArgumentIsReplaced()
$this->cachePoolPass->process($container);
- $this->assertSame('D07rhFx97S', $cachePool->getArgument(0));
+ $this->assertSame('z3X945Jbf5', $cachePool->getArgument(0));
}
public function testNamespaceArgumentIsNotReplacedIfArrayAdapterIsUsed()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.container_class', 'app');
$container->setParameter('kernel.project_dir', 'foo');
@@ -74,9 +71,7 @@ public function testNamespaceArgumentIsNotReplacedIfArrayAdapterIsUsed()
public function testArgsAreReplaced()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('cache.prefix.seed', 'foo');
$cachePool = new Definition();
$cachePool->addTag('cache.pool', array(
@@ -92,16 +87,14 @@ public function testArgsAreReplaced()
$this->assertInstanceOf(Reference::class, $cachePool->getArgument(0));
$this->assertSame('foobar', (string) $cachePool->getArgument(0));
- $this->assertSame('itantF+pIq', $cachePool->getArgument(1));
+ $this->assertSame('tQNhcV-8xa', $cachePool->getArgument(1));
$this->assertSame(3, $cachePool->getArgument(2));
}
public function testWithNameAttribute()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('cache.prefix.seed', 'foo');
$cachePool = new Definition();
$cachePool->addTag('cache.pool', array(
@@ -115,7 +108,7 @@ public function testWithNameAttribute()
$this->cachePoolPass->process($container);
- $this->assertSame('9HvPgAayyh', $cachePool->getArgument(1));
+ $this->assertSame('+naTpPa4Sm', $cachePool->getArgument(1));
}
/**
@@ -125,9 +118,7 @@ public function testWithNameAttribute()
public function testThrowsExceptionWhenCachePoolTagHasUnknownAttributes()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.project_dir', 'foo');
$adapter = new Definition();
$adapter->setAbstract(true);
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
index c6d49f0208722..2a8c6b071a535 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
@@ -154,13 +154,6 @@
Symfony version
- {% if 'n/a' != collector.appname %}
-
- {{ collector.appname }}
- Application name
-
- {% endif %}
-
{% if 'n/a' != collector.env %}
{{ collector.env }}
diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php
index 4e6084528dab4..92e2017e6fe12 100644
--- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php
+++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php
@@ -52,7 +52,7 @@ public function process(ContainerBuilder $container)
} else {
$seed = '_'.$container->getParameter('kernel.project_dir');
}
- $seed .= '.'.$container->getParameter('kernel.container_class').'.'.$container->getParameter('kernel.environment');
+ $seed .= '.'.$container->getParameter('kernel.container_class');
$pools = array();
$clearers = array();
diff --git a/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolClearerPassTest.php b/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolClearerPassTest.php
index 69e9acced983b..6aa68c29cd830 100644
--- a/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolClearerPassTest.php
+++ b/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolClearerPassTest.php
@@ -26,9 +26,7 @@ class CachePoolClearerPassTest extends TestCase
public function testPoolRefsAreWeak()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.project_dir', 'foo');
$globalClearer = new Definition(Psr6CacheClearer::class);
diff --git a/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php b/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php
index 8bc4262c2fbf4..f757e7982124c 100644
--- a/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php
+++ b/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php
@@ -31,9 +31,7 @@ protected function setUp()
public function testNamespaceArgumentIsReplaced()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.project_dir', 'foo');
$adapter = new Definition();
$adapter->setAbstract(true);
@@ -47,13 +45,12 @@ public function testNamespaceArgumentIsReplaced()
$this->cachePoolPass->process($container);
- $this->assertSame('D07rhFx97S', $cachePool->getArgument(0));
+ $this->assertSame('z3X945Jbf5', $cachePool->getArgument(0));
}
public function testNamespaceArgumentIsNotReplacedIfArrayAdapterIsUsed()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.container_class', 'app');
$container->setParameter('kernel.project_dir', 'foo');
@@ -71,9 +68,7 @@ public function testNamespaceArgumentIsNotReplacedIfArrayAdapterIsUsed()
public function testArgsAreReplaced()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('cache.prefix.seed', 'foo');
$cachePool = new Definition();
$cachePool->addTag('cache.pool', array(
@@ -89,16 +84,14 @@ public function testArgsAreReplaced()
$this->assertInstanceOf(Reference::class, $cachePool->getArgument(0));
$this->assertSame('foobar', (string) $cachePool->getArgument(0));
- $this->assertSame('itantF+pIq', $cachePool->getArgument(1));
+ $this->assertSame('tQNhcV-8xa', $cachePool->getArgument(1));
$this->assertSame(3, $cachePool->getArgument(2));
}
public function testWithNameAttribute()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('cache.prefix.seed', 'foo');
$cachePool = new Definition();
$cachePool->addTag('cache.pool', array(
@@ -112,7 +105,7 @@ public function testWithNameAttribute()
$this->cachePoolPass->process($container);
- $this->assertSame('9HvPgAayyh', $cachePool->getArgument(1));
+ $this->assertSame('+naTpPa4Sm', $cachePool->getArgument(1));
}
/**
@@ -122,9 +115,7 @@ public function testWithNameAttribute()
public function testThrowsExceptionWhenCachePoolTagHasUnknownAttributes()
{
$container = new ContainerBuilder();
- $container->setParameter('kernel.debug', false);
$container->setParameter('kernel.container_class', 'app');
- $container->setParameter('kernel.environment', 'prod');
$container->setParameter('kernel.project_dir', 'foo');
$adapter = new Definition();
$adapter->setAbstract(true);
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
index 3343042481ba5..14b4b480047e3 100644
--- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
+++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
@@ -60,7 +60,6 @@ public function collect(Request $request, Response $response, \Exception $except
'token' => $response->headers->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION,
'symfony_state' => 'unknown',
- 'name' => 'n/a',
'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a',
'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a',
'php_version' => PHP_VERSION,
@@ -232,7 +231,9 @@ public function getPhpTimezone()
*/
public function getAppName()
{
- return $this->data['name'];
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
+
+ return 'n/a';
}
/**
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index 219ff05b29f20..e4207819dda07 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -276,6 +276,8 @@ public function locateResource($name, $dir = null, $first = true)
/**
* {@inheritdoc}
+ *
+ * @deprecated since Symfony 4.2
*/
public function getName(/* $triggerDeprecation = true */)
{
@@ -440,7 +442,7 @@ protected function build(ContainerBuilder $container)
*/
protected function getContainerClass()
{
- return str_replace('\\', '_', \get_class($this)).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container';
+ return $this->name.str_replace('\\', '_', \get_class($this)).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container';
}
/**
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php
index b54af42d7d2ef..4d40560792d0a 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php
@@ -30,7 +30,6 @@ public function testCollect()
$this->assertSame('test', $c->getEnv());
$this->assertTrue($c->isDebug());
$this->assertSame('config', $c->getName());
- $this->assertSame('n/a', $c->getAppName());
$this->assertRegExp('~^'.preg_quote($c->getPhpVersion(), '~').'~', PHP_VERSION);
$this->assertRegExp('~'.preg_quote((string) $c->getPhpVersionExtra(), '~').'$~', PHP_VERSION);
$this->assertSame(PHP_INT_SIZE * 8, $c->getPhpArchitecture());
diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
index bc6ab05a53385..ccbf22242d283 100644
--- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
@@ -75,7 +75,7 @@ public function testInitializeContainerClearsOldContainers()
$kernel->boot();
$containerDir = __DIR__.'/Fixtures/var/cache/custom/'.substr(\get_class($kernel->getContainer()), 0, 16);
- $this->assertTrue(unlink(__DIR__.'/Fixtures/var/cache/custom/Symfony_Component_HttpKernel_Tests_CustomProjectDirKernelCustomDebugContainer.php.meta'));
+ $this->assertTrue(unlink(__DIR__.'/Fixtures/var/cache/custom/FixturesSymfony_Component_HttpKernel_Tests_CustomProjectDirKernelCustomDebugContainer.php.meta'));
$this->assertFileExists($containerDir);
$this->assertFileNotExists($containerDir.'.legacy');
@@ -533,14 +533,14 @@ public function testKernelReset()
$containerClass = \get_class($kernel->getContainer());
$containerFile = (new \ReflectionClass($kernel->getContainer()))->getFileName();
- unlink(__DIR__.'/Fixtures/var/cache/custom/Symfony_Component_HttpKernel_Tests_CustomProjectDirKernelCustomDebugContainer.php.meta');
+ unlink(__DIR__.'/Fixtures/var/cache/custom/FixturesSymfony_Component_HttpKernel_Tests_CustomProjectDirKernelCustomDebugContainer.php.meta');
$kernel = new CustomProjectDirKernel();
$kernel->boot();
$this->assertInstanceOf($containerClass, $kernel->getContainer());
$this->assertFileExists($containerFile);
- unlink(__DIR__.'/Fixtures/var/cache/custom/Symfony_Component_HttpKernel_Tests_CustomProjectDirKernelCustomDebugContainer.php.meta');
+ unlink(__DIR__.'/Fixtures/var/cache/custom/FixturesSymfony_Component_HttpKernel_Tests_CustomProjectDirKernelCustomDebugContainer.php.meta');
$kernel = new CustomProjectDirKernel(function ($container) { $container->register('foo', 'stdClass')->setPublic(true); });
$kernel->boot();