From c2b94a1f75ea7b60af26df95ec41ec3005e9c07f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 4 Sep 2015 22:16:19 +0200 Subject: [PATCH] [2.8] Cleanup --- .../ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php | 10 ++++++---- src/Symfony/Bundle/SecurityBundle/composer.json | 2 -- src/Symfony/Component/DependencyInjection/CHANGELOG.md | 1 + .../IntrospectableContainerInterface.php | 2 ++ .../Firewall/SimplePreAuthenticationListenerTest.php | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index 076484567aae6..e1ec80608c633 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -68,11 +68,13 @@ public function getProxyFactoryCode(Definition $definition, $id) { $instantiation = 'return'; - if ($definition->isShared() && ContainerInterface::SCOPE_CONTAINER === $definition->getScope(false)) { + if ($definition->isShared()) { $instantiation .= " \$this->services['$id'] ="; - } elseif ($definition->isShared() && ContainerInterface::SCOPE_PROTOTYPE !== $scope = $definition->getScope(false)) { - $instantiation .= " \$this->services['$id'] = \$this->scopedServices['$scope']['$id'] ="; - } + + if (defined('Symfony\Component\DependencyInjection\ContainerInterface::SCOPE_CONTAINER') && ContainerInterface::SCOPE_CONTAINER !== $scope = $definition->getScope(false)) { + $instantiation .= " \$this->scopedServices['$scope']['$id'] ="; + } + } $methodName = 'get'.Container::camelize($id).'Service'; $proxyClass = $this->getProxyClassName($definition); diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 18218215fbd72..4eb1ded3f123d 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -27,9 +27,7 @@ "symfony/config": "~2.8|~3.0.0", "symfony/console": "~2.7|~3.0.0", "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6,>=2.6.6|~3.0.0", "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", - "symfony/form": "~2.8", "symfony/framework-bundle": "~2.8", "symfony/http-foundation": "~2.4|~3.0.0", "symfony/twig-bundle": "~2.7|~3.0.0", diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index 02cb2d50ec59b..fa29930c75499 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 2.8.0 ----- + * deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0 * allowed specifying a directory to recursively load all configuration files it contains * deprecated the concept of scopes * added `Definition::setShared()` and `Definition::isShared()` diff --git a/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php b/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php index e630a1edc6561..4aa0059992e5b 100644 --- a/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php @@ -16,6 +16,8 @@ * for containers, allowing logic to be implemented based on a Container's state. * * @author Evan Villemez + * + * @deprecated since version 2.8, to be merged with ContainerInterface in 3.0. */ interface IntrospectableContainerInterface extends ContainerInterface { diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php index 0a1286cd172ae..adf91b1c4d1b0 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php @@ -42,7 +42,7 @@ public function testHandle() ->will($this->returnValue($this->token)) ; - $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface'); + $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface'); $simpleAuthenticator ->expects($this->once()) ->method('createToken') @@ -79,7 +79,7 @@ public function testHandlecatchAuthenticationException() ->with($this->equalTo(null)) ; - $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface'); + $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface'); $simpleAuthenticator ->expects($this->once()) ->method('createToken') 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