Skip to content

[HttpKernel] Dont register env parameter resource #24067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 0 additions & 97 deletions src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php

This file was deleted.

2 changes: 0 additions & 2 deletions src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass;
Expand Down Expand Up @@ -625,7 +624,6 @@ protected function buildContainer()
}

$container->addCompilerPass(new AddAnnotatedClassesToCachePass($this));
$container->addResource(new EnvParametersResource('SYMFONY__'));

return $container;
}
Expand Down

This file was deleted.

37 changes: 0 additions & 37 deletions src/Symfony/Component/HttpKernel/Tests/KernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down Expand Up @@ -104,42 +103,6 @@ public function testClassCacheIsNotLoadedByDefault()
$kernel->boot();
}

public function testEnvParametersResourceIsAdded()
{
$container = new ContainerBuilder();
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest')
->disableOriginalConstructor()
->setMethods(array('getContainerBuilder', 'prepareContainer', 'getCacheDir', 'getLogDir'))
->getMock();
$kernel->expects($this->any())
->method('getContainerBuilder')
->will($this->returnValue($container));
$kernel->expects($this->any())
->method('prepareContainer')
->will($this->returnValue(null));
$kernel->expects($this->any())
->method('getCacheDir')
->will($this->returnValue(sys_get_temp_dir()));
$kernel->expects($this->any())
->method('getLogDir')
->will($this->returnValue(sys_get_temp_dir()));

$reflection = new \ReflectionClass(get_class($kernel));
$method = $reflection->getMethod('buildContainer');
$method->setAccessible(true);
$method->invoke($kernel);

$found = false;
foreach ($container->getResources() as $resource) {
if ($resource instanceof EnvParametersResource) {
$found = true;
break;
}
}

$this->assertTrue($found);
}

public function testBootKernelSeveralTimesOnlyInitializesBundlesOnce()
{
$kernel = $this->getKernel(array('initializeBundles', 'initializeContainer'));
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy