8000 [2.8] Deprecate IntrospectableContainerInterface by nicolas-grekas · Pull Request #15694 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[2.8] Deprecate IntrospectableContainerInterface #15694

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 6, 2015
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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bundle/SecurityBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two constraints are duplicates of similar ones in framework-bundle, and for some reason (a bug in composer?) they can create dependency resolving failure. Removing them fixes the issue without changing anything to the resolved set.

"symfony/twig-bundle": "~2.7|~3.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/DependencyInjection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* for containers, allowing logic to be implemented based on a Container's state.
*
* @author Evan Villemez <evillemez@gmail.com>
*
* @deprecated since version 2.8, to be merged with ContainerInterface in 3.0.
*/
interface IntrospectableContainerInterface extends ContainerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down
0