diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php
index 7b2adfcf6eadd..0c782a3e99773 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php
@@ -55,11 +55,12 @@ public function testProcess()
'Test\private_used_shared_service' => new ServiceClosureArgument(new Reference('Test\private_used_shared_service')),
'Test\private_used_non_shared_service' => new ServiceClosureArgument(new Reference('Test\private_used_non_shared_service')),
'Test\soon_private_service' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service')),
- 'Psr\Container\ContainerInterface' => new ServiceClosureArgument(new Reference('service_container')),
- 'Symfony\Component\DependencyInjection\ContainerInterface' => new ServiceClosureArgument(new Reference('service_container')),
];
- $this->assertEquals($expected, $container->getDefinition('test.private_services_locator')->getArgument(0));
- $this->assertSame($container, $container->get('test.private_services_locator')->get('Psr\Container\ContainerInterface'));
+ $actual = $container->getDefinition('test.private_services_locator')->getArgument(0);
+ // When testing against DependencyInjection 5.4, those deprecated services will still appear.
+ unset($actual['Psr\Container\ContainerInterface'], $actual['Symfony\Component\DependencyInjection\ContainerInterface']);
+
+ $this->assertEquals($expected, $actual);
$this->assertFalse($container->getDefinition('Test\private_used_non_shared_service')->isShared());
}
}
diff --git a/src/Symfony/Component/DependencyInjection/Alias.php b/src/Symfony/Component/DependencyInjection/Alias.php
index 6487331734b0e..e4a7260530084 100644
--- a/src/Symfony/Component/DependencyInjection/Alias.php
+++ b/src/Symfony/Component/DependencyInjection/Alias.php
@@ -49,20 +49,6 @@ public function setPublic(bool $boolean)
return $this;
}
- /**
- * Sets if this Alias is private.
- *
- * @return $this
- *
- * @deprecated since Symfony 5.2, use setPublic() instead
- */
- public function setPrivate(bool $boolean)
- {
- trigger_deprecation('symfony/dependency-injection', '5.2', 'The "%s()" method is deprecated, use "setPublic()" instead.', __METHOD__);
-
- return $this->setPublic(!$boolean);
- }
-
/**
* Whether this alias is private.
*
@@ -85,28 +71,8 @@ public function isPrivate()
*
* @throws InvalidArgumentException when the message template is invalid
*/
- public function setDeprecated(/* string $package, string $version, string $message */)
+ public function setDeprecated(string $package, string $version, string $message)
{
- $args = \func_get_args();
-
- if (\func_num_args() < 3) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__);
-
- $status = $args[0] ?? true;
-
- if (!$status) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Passing a null message to un-deprecate a node is deprecated.');
- }
-
- $message = (string) ($args[1] ?? null);
- $package = $version = '';
- } else {
- $status = true;
- $package = (string) $args[0];
- $version = (string) $args[1];
- $message = (string) $args[2];
- }
-
if ('' !== $message) {
if (preg_match('#[\r\n]|\*/#', $message)) {
throw new InvalidArgumentException('Invalid characters found in deprecation template.');
@@ -117,7 +83,7 @@ public function setDeprecated(/* string $package, string $version, string $messa
}
}
- $this->deprecation = $status ? ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE] : [];
+ $this->deprecation = ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE];
return $this;
}
@@ -127,16 +93,6 @@ public function isDeprecated(): bool
return (bool) $this->deprecation;
}
- /**
- * @deprecated since Symfony 5.1, use "getDeprecation()" instead.
- */
- public function getDeprecationMessage(string $id): string
- {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__);
-
- return $this->getDeprecation($id)['message'];
- }
-
/**
* @param string $id Service id relying on this definition
*/
diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md
index 36a576e99d739..0fd9106ff6bba 100644
--- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md
+++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md
@@ -1,6 +1,15 @@
CHANGELOG
=========
+6.0
+---
+
+ * Remove `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead
+ * Remove `inline()` in favor of `inline_service()` and `ref()` in favor of `service()` when using the PHP-DSL
+ * Remove `Definition::getDeprecationMessage()`, use `Definition::getDeprecation()` instead
+ * Remove `Alias::getDeprecationMessage()`, use `Alias::getDeprecation()` instead
+ * Remove the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service
+
5.3
---
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php
index c03b9817a5db4..c40b56708b1ff 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php
@@ -137,13 +137,9 @@ private function doResolveDefinition(ChildDefinition $definition): Definition
if (isset($changes['lazy'])) {
$def->setLazy($definition->isLazy());
}
- if (isset($changes['deprecated'])) {
- if ($definition->isDeprecated()) {
- $deprecation = $definition->getDeprecation('%service_id%');
- $def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']);
- } else {
- $def->setDeprecated(false);
- }
+ if (isset($changes['deprecated']) && $definition->isDeprecated()) {
+ $deprecation = $definition->getDeprecation('%service_id%');
+ $def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']);
}
if (isset($changes['autowired'])) {
$def->setAutowired($definition->isAutowired());
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolvePrivatesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolvePrivatesPass.php
deleted file mode 100644
index b63e3f5c2fad2..0000000000000
--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolvePrivatesPass.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-trigger_deprecation('symfony/dependency-injection', '5.2', 'The "%s" class is deprecated.', ResolvePrivatesPass::class);
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * @author Nicolas Grekas
- *
- * @deprecated since Symfony 5.2
- */
-class ResolvePrivatesPass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition->isPrivate()) {
- $definition->setPublic(false);
- $definition->setPrivate(true);
- }
- }
-
- foreach ($container->getAliases() as $id => $alias) {
- if ($alias->isPrivate()) {
- $alias->setPublic(false);
- $alias->setPrivate(true);
- }
- }
- }
-}
diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php
index 11ac8534f8dfe..9741611d35c38 100644
--- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php
+++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php
@@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection;
use Composer\InstalledVersions;
-use Psr\Container\ContainerInterface as PsrContainerInterface;
use Symfony\Component\Config\Resource\ClassExistenceResource;
use Symfony\Component\Config\Resource\ComposerResource;
use Symfony\Component\Config\Resource\DirectoryResource;
@@ -141,8 +140,6 @@ public function __construct(ParameterBagInterface $parameterBag = null)
$this->trackResources = interface_exists(ResourceInterface::class);
$this->setDefinition('service_container', (new Definition(ContainerInterface::class))->setSynthetic(true)->setPublic(true));
- $this->setAlias(PsrContainerInterface::class, new Alias('service_container', false))->setDeprecated('symfony/dependency-injection', '5.1', $deprecationMessage = 'The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.');
- $this->setAlias(ContainerInterface::class, new Alias('service_container', false))->setDeprecated('symfony/dependency-injection', '5.1', $deprecationMessage);
}
/**
diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php
index 482a0e9e61e55..f4300af3fd394 100644
--- a/src/Symfony/Component/DependencyInjection/Definition.php
+++ b/src/Symfony/Component/DependencyInjection/Definition.php
@@ -586,20 +586,6 @@ public function isPublic()
return $this->public;
}
- /**
- * Sets if this service is private.
- *
- * @return $this
- *
- * @deprecated since Symfony 5.2, use setPublic() instead
- */
- public function setPrivate(bool $boolean)
- {
- trigger_deprecation('symfony/dependency-injection', '5.2', 'The "%s()" method is deprecated, use "setPublic()" instead.', __METHOD__);
-
- return $this->setPublic(!$boolean);
- }
-
/**
* Whether this service is private.
*
@@ -698,28 +684,8 @@ public function isAbstract()
*
* @throws InvalidArgumentException when the message template is invalid
*/
- public function setDeprecated(/* string $package, string $version, string $message */)
+ public function setDeprecated(string $package, string $version, string $message)
{
- $args = \func_get_args();
-
- if (\func_num_args() < 3) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__);
-
- $status = $args[0] ?? true;
-
- if (!$status) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Passing a null message to un-deprecate a node is deprecated.');
- }
-
- $message = (string) ($args[1] ?? null);
- $package = $version = '';
- } else {
- $status = true;
- $package = (string) $args[0];
- $version = (string) $args[1];
- $message = (string) $args[2];
- }
-
if ('' !== $message) {
if (preg_match('#[\r\n]|\*/#', $message)) {
throw new InvalidArgumentException('Invalid characters found in deprecation template.');
@@ -731,7 +697,7 @@ public function setDeprecated(/* string $package, string $version, string $messa
}
$this->changes['deprecated'] = true;
- $this->deprecation = $status ? ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE] : [];
+ $this->deprecation = ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE];
return $this;
}
@@ -747,22 +713,6 @@ public function isDeprecated()
return (bool) $this->deprecation;
}
- /**
- * Message to use if this definition is deprecated.
- *
- * @deprecated since Symfony 5.1, use "getDeprecation()" instead.
- *
- * @param string $id Service id relying on this definition
- *
- * @return string
- */
- public function getDeprecationMessage(string $id)
- {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__);
-
- return $this->getDeprecation($id)['message'];
- }
-
/**
* @param string $id Service id relying on this definition
*/
diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
index c5622a72c5138..eb1df2dd0d460 100644
--- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
+++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
@@ -103,18 +103,6 @@ function param(string $name): ParamConfigurator
return new ParamConfigurator($name);
}
-/**
- * Creates a service reference.
- *
- * @deprecated since Symfony 5.1, use service() instead.
- */
-function ref(string $id): ReferenceConfigurator
-{
- trigger_deprecation('symfony/dependency-injection', '5.1', '"%s()" is deprecated, use "service()" instead.', __FUNCTION__);
-
- return new ReferenceConfigurator($id);
-}
-
/**
* Creates a reference to a service.
*/
@@ -123,18 +111,6 @@ function service(string $serviceId): ReferenceConfigurator
return new ReferenceConfigurator($serviceId);
}
-/**
- * Creates an inline service.
- *
- * @deprecated since Symfony 5.1, use inline_service() instead.
- */
-function inline(string $class = null): InlineServiceConfigurator
-{
- trigger_deprecation('symfony/dependency-injection', '5.1', '"%s()" is deprecated, use "inline_service()" instead.', __FUNCTION__);
-
- return new InlineServiceConfigurator(new Definition($class));
-}
-
/**
* Creates an inline service.
*/
diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php
index ea77e456d843d..94ad60fbf9719 100644
--- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php
+++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php
@@ -26,21 +26,8 @@ trait DeprecateTrait
*
* @throws InvalidArgumentException when the message template is invalid
*/
- final public function deprecate(/* string $package, string $version, string $message */): self
+ final public function deprecate(string $package, string $version, string $message): self
{
- $args = \func_get_args();
- $package = $version = $message = '';
-
- if (\func_num_args() < 3) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__);
-
- $message = (string) ($args[0] ?? null);
- } else {
- $package = (string) $args[0];
- $version = (string) $args[1];
- $message = (string) $args[2];
- }
-
$this->definition->setDeprecated($package, $version, $message);
return $this;
diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
index 60dad8e7e57bd..4123af7e18ee0 100644
--- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
+++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
@@ -225,11 +225,11 @@ private function parseDefinition(\DOMElement $service, string $file, Definition
$version = $deprecated[0]->getAttribute('version') ?: '';
if (!$deprecated[0]->hasAttribute('package')) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the node "deprecated" in "%s" is deprecated.', $file);
+ throw new InvalidArgumentException(sprintf('Missing attribute "package" at node "deprecated" in "%s".', $file));
}
if (!$deprecated[0]->hasAttribute('version')) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the node "deprecated" in "%s" is deprecated.', $file);
+ throw new InvalidArgumentException(sprintf('Missing attribute "version" at node "deprecated" in "%s".', $file));
}
$alias->setDeprecated($package, $version, $message);
@@ -284,12 +284,12 @@ private function parseDefinition(\DOMElement $service, string $file, Definition
$package = $deprecated[0]->getAttribute('package') ?: '';
$version = $deprecated[0]->getAttribute('version') ?: '';
- if ('' === $package) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the node "deprecated" in "%s" is deprecated.', $file);
+ if (!$deprecated[0]->hasAttribute('package')) {
+ throw new InvalidArgumentException(sprintf('Missing attribute "package" at node "deprecated" in "%s".', $file));
}
- if ('' === $version) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the node "deprecated" in "%s" is deprecated.', $file);
+ if (!$deprecated[0]->hasAttribute('version')) {
+ throw new InvalidArgumentException(sprintf('Missing attribute "version" at node "deprecated" in "%s".', $file));
}
$definition->setDeprecated($package, $version, $message);
diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
index f98f69972e913..0c8c0deb2e8a2 100644
--- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
@@ -13,7 +13,6 @@
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
@@ -429,11 +428,11 @@ private function parseDefinition(string $id, array|string|null $service, string
$deprecation = \is_array($value) ? $value : ['message' => $value];
if (!isset($deprecation['package'])) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the "deprecated" option in "%s" is deprecated.', $file);
+ throw new InvalidArgumentException(sprintf('Missing attribute "package" of the "deprecated" option in "%s".', $file));
}
if (!isset($deprecation['version'])) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the "deprecated" option in "%s" is deprecated.', $file);
+ throw new InvalidArgumentException(sprintf('Missing attribute "version" of the "deprecated" option in "%s".', $file));
}
$alias->setDeprecated($deprecation['package'] ?? '', $deprecation['version'] ?? '', $deprecation['message'] ?? '');
@@ -500,11 +499,11 @@ private function parseDefinition(string $id, array|string|null $service, string
$deprecation = \is_array($service['deprecated']) ? $service['deprecated'] : ['message' => $service['deprecated']];
if (!isset($deprecation['package'])) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the "deprecated" option in "%s" is deprecated.', $file);
+ throw new InvalidArgumentException(sprintf('Missing attribute "package" of the "deprecated" option in "%s".', $file));
}
if (!isset($deprecation['version'])) {
- trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the "deprecated" option in "%s" is deprecated.', $file);
+ throw new InvalidArgumentException(sprintf('Missing attribute "version" of the "deprecated" option in "%s".', $file));
}
$definition->setDeprecated($deprecation['package'] ?? '', $deprecation['version'] ?? '', $deprecation['message'] ?? '');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php
index e2e6f0a0b67a2..05734b3ee6753 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php
@@ -12,14 +12,11 @@
namespace Symfony\Component\DependencyInjection\Tests;
use PHPUnit\Framework\TestCase;
-use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
class AliasTest extends TestCase
{
- use ExpectDeprecationTrait;
-
public function testConstructor()
{
$alias = new Alias('foo');
@@ -61,36 +58,6 @@ public function testCanDeprecateAnAlias()
$this->assertTrue($alias->isDeprecated());
}
- /**
- * @group legacy
- */
- public function testItHasADefaultDeprecationMessage()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: The signature of method "Symfony\Component\DependencyInjection\Alias::setDeprecated()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.');
-
- $alias = new Alias('foo', false);
- $alias->setDeprecated();
-
- $expectedMessage = 'The "foo" service alias is deprecated. You should stop using it, as it will be removed in the future.';
- $this->assertEquals($expectedMessage, $alias->getDeprecation('foo')['message']);
- }
-
- /**
- * @group legacy
- */
- public function testSetDeprecatedWithoutPackageAndVersion()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: The signature of method "Symfony\Component\DependencyInjection\Alias::setDeprecated()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.');
-
- $def = new Alias('stdClass');
- $def->setDeprecated(true, '%alias_id%');
-
- $deprecation = $def->getDeprecation('deprecated_alias');
- $this->assertSame('deprecated_alias', $deprecation['message']);
- $this->assertSame('', $deprecation['package']);
- $this->assertSame('', $deprecation['version']);
- }
-
public function testReturnsCorrectDeprecation()
{
$alias = new Alias('foo', false);
@@ -102,22 +69,6 @@ public function testReturnsCorrectDeprecation()
$this->assertEquals('1.1', $deprecation['version']);
}
- /**
- * @group legacy
- */
- public function testCanOverrideDeprecation()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: The signature of method "Symfony\Component\DependencyInjection\Alias::setDeprecated()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.');
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: Passing a null message to un-deprecate a node is deprecated.');
-
- $alias = new Alias('foo', false);
- $alias->setDeprecated('vendor/package', '1.1', 'The "%alias_id%" is deprecated.');
- $this->assertTrue($alias->isDeprecated());
-
- $alias->setDeprecated(false);
- $this->assertFalse($alias->isDeprecated());
- }
-
/**
* @dataProvider invalidDeprecationMessageProvider
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
index f35d7af581b7b..49a1991da1991 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
@@ -312,28 +312,6 @@ public function testDecoratedServiceCopiesDeprecatedStatusFromParent()
$this->assertTrue($container->getDefinition('decorated_deprecated_parent')->isDeprecated());
}
- /**
- * @group legacy
- */
- public function testDecoratedServiceCanOverwriteDeprecatedParentStatus()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: The signature of method "Symfony\Component\DependencyInjection\Definition::setDeprecated()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.');
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: Passing a null message to un-deprecate a node is deprecated.');
-
- $container = new ContainerBuilder();
- $container->register('deprecated_parent')
- ->setDeprecated(true)
- ;
-
- $container->setDefinition('decorated_deprecated_parent', new ChildDefinition('deprecated_parent'))
- ->setDeprecated(false)
- ;
-
- $this->process($container);
-
- $this->assertFalse($container->getDefinition('decorated_deprecated_parent')->isDeprecated());
- }
-
public function testProcessResolvesAliases()
{
$container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolvePrivatesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolvePrivatesPassTest.php
deleted file mode 100644
index ab969adbe2a10..0000000000000
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolvePrivatesPassTest.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Tests\Compiler;
-
-use PHPUnit\Framework\TestCase;
-use Symfony\Component\DependencyInjection\Compiler\ResolvePrivatesPass;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * @group legacy
- */
-class ResolvePrivatesPassTest extends TestCase
-{
- public function testPrivateHasHigherPrecedenceThanPublic()
- {
- $container = new ContainerBuilder();
-
- $container->register('foo', 'stdClass')
- ->setPublic(true)
- ->setPrivate(true)
- ;
-
- $container->setAlias('bar', 'foo')
- ->setPublic(false)
- ->setPrivate(false)
- ;
-
- (new ResolvePrivatesPass())->process($container);
-
- $this->assertFalse($container->getDefinition('foo')->isPublic());
- $this->assertTrue($container->getAlias('bar')->isPublic());
- }
-}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
index dbdd9eb43312a..b619f08f22ba3 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
@@ -16,7 +16,6 @@
require_once __DIR__.'/Fixtures/includes/ProjectExtension.php';
use PHPUnit\Framework\TestCase;
-use Psr\Container\ContainerInterface as PsrContainerInterface;
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
use Symfony\Component\Config\Resource\DirectoryResource;
use Symfony\Component\Config\Resource\FileResource;
@@ -70,8 +69,6 @@ public function testDefaultRegisteredDefinitions()
$this->assertInstanceOf(Definition::class, $definition);
$this->assertTrue($definition->isSynthetic());
$this->assertSame(ContainerInterface::class, $definition->getClass());
- $this->assertTrue($builder->hasAlias(PsrContainerInterface::class));
- $this->assertTrue($builder->hasAlias(ContainerInterface::class));
}
public function testDefinitions()
@@ -101,21 +98,6 @@ public function testDefinitions()
}
}
- /**
- * @group legacy
- */
- public function testCreateDeprecatedService()
- {
- $this->expectDeprecation('The "deprecated_foo" service is deprecated. You should stop using it, as it will be removed in the future.');
-
- $definition = new Definition('stdClass');
- $definition->setDeprecated(true);
-
- $builder = new ContainerBuilder();
- $builder->setDefinition('deprecated_foo', $definition);
- $builder->get('deprecated_foo');
- }
-
public function testRegister()
{
$builder = new ContainerBuilder();
@@ -267,8 +249,6 @@ public function testGetServiceIds()
'service_container',
'foo',
'bar',
- 'Psr\Container\ContainerInterface',
- 'Symfony\Component\DependencyInjection\ContainerInterface',
],
$builder->getServiceIds(),
'->getServiceIds() returns all defined service ids'
@@ -301,23 +281,6 @@ public function testAliases()
}
}
- /**
- * @group legacy
- */
- public function testDeprecatedAlias()
- {
- $this->expectDeprecation('The "foobar" service alias is deprecated. You should stop using it, as it will be removed in the future.');
-
- $builder = new ContainerBuilder();
- $builder->register('foo', 'stdClass');
-
- $alias = new Alias('foo');
- $alias->setDeprecated();
- $builder->setAlias('foobar', $alias);
-
- $builder->get('foobar');
- }
-
public function testGetAliases()
{
$builder = new ContainerBuilder();
@@ -337,7 +300,7 @@ public function testGetAliases()
$builder->set('foobar', new \stdClass());
$builder->set('moo', new \stdClass());
- $this->assertCount(2, $builder->getAliases(), '->getAliases() does not return aliased services that have been overridden');
+ $this->assertCount(0, $builder->getAliases(), '->getAliases() does not return aliased services that have been overridden');
}
public function testSetAliases()
@@ -862,8 +825,6 @@ public function testEnvInId()
$this->assertSame($expected, array_keys($container->getDefinitions()));
$expected = [
- PsrContainerInterface::class => true,
- ContainerInterface::class => true,
'baz_%env(BAR)%' => true,
'bar_%env(BAR)%' => true,
];
@@ -1517,7 +1478,7 @@ public function testCaseSensitivity()
$container->register('Foo', 'stdClass')->setProperty('foo', new Reference('foo'));
$container->register('fOO', 'stdClass')->setProperty('Foo', new Reference('Foo'))->setPublic(true);
- $this->assertSame(['service_container', 'foo', 'Foo', 'fOO', 'Psr\Container\ContainerInterface', 'Symfony\Component\DependencyInjection\ContainerInterface'], $container->getServiceIds());
+ $this->assertSame(['service_container', 'foo', 'Foo', 'fOO'], $container->getServiceIds());
$container->compile();
@@ -1553,7 +1514,7 @@ public function testArgumentsHaveHigherPriorityThanBindings()
'$class1' => new Reference('class.via.argument'),
]);
- $this->assertSame(['service_container', 'class.via.bindings', 'class.via.argument', 'foo', 'Psr\Container\ContainerInterface', 'Symfony\Component\DependencyInjection\ContainerInterface'], $container->getServiceIds());
+ $this->assertSame(['service_container', 'class.via.bindings', 'class.via.argument', 'foo'], $container->getServiceIds());
$container->compile();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
index 5863a490532a3..75fa4b0213f03 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
@@ -187,22 +187,6 @@ public function testSetIsDeprecated()
$this->assertSame('1.1', $deprecation['version']);
}
- /**
- * @group legacy
- */
- public function testSetDeprecatedWithoutPackageAndVersion()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: The signature of method "Symfony\Component\DependencyInjection\Definition::setDeprecated()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.');
-
- $def = new Definition('stdClass');
- $def->setDeprecated(true, '%service_id%');
-
- $deprecation = $def->getDeprecation('deprecated_service');
- $this->assertSame('deprecated_service', $deprecation['message']);
- $this->assertSame('', $deprecation['package']);
- $this->assertSame('', $deprecation['version']);
- }
-
/**
* @dataProvider invalidDeprecationMessageProvider
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
index 00803c815ffbe..899d836a67c7e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
@@ -443,24 +443,6 @@ public function testAliases()
$this->assertSame($foo, $container->get('alias_for_alias'));
}
- /**
- * @group legacy
- */
- public function testAliasesDeprecation()
- {
- $this->expectDeprecation('The "alias_for_foo_deprecated" service alias is deprecated. You should stop using it, as it will be removed in the future.');
- $container = include self::$fixturesPath.'/containers/container_alias_deprecation.php';
- $container->compile();
- $dumper = new PhpDumper($container);
-
- $this->assertStringEqualsFile(self::$fixturesPath.'/php/container_alias_deprecation.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Aliases_Deprecation']));
-
- require self::$fixturesPath.'/php/container_alias_deprecation.php';
- $container = new \Symfony_DI_PhpDumper_Test_Aliases_Deprecation();
- $container->get('alias_for_foo_non_deprecated');
- $container->get('alias_for_foo_deprecated');
- }
-
public function testFrozenContainerWithoutAliases()
{
$container = new ContainerBuilder();
@@ -1287,31 +1269,6 @@ public function testAdawsonContainer()
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_adawson.php', $dumper->dump());
}
- /**
- * This test checks the trigger of a deprecation note and should not be removed in major releases.
- *
- * @group legacy
- */
- public function testPrivateServiceTriggersDeprecation()
- {
- $this->expectDeprecation('The "foo" service is deprecated. You should stop using it, as it will be removed in the future.');
- $container = new ContainerBuilder();
- $container->register('foo', 'stdClass')
- ->setDeprecated(true);
- $container->register('bar', 'stdClass')
- ->setPublic(true)
- ->setProperty('foo', new Reference('foo'));
-
- $container->compile();
-
- $dumper = new PhpDumper($container);
- eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation']));
-
- $container = new \Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation();
-
- $container->get('bar');
- }
-
public function testParameterWithMixedCase()
{
$container = new ContainerBuilder(new ParameterBag(['Foo' => 'bar', 'BAR' => 'foo']));
@@ -1462,30 +1419,6 @@ public function testWitherWithStaticReturnType()
$this->assertInstanceOf(Foo::class, $wither->foo);
}
- /**
- * @group legacy
- */
- public function testMultipleDeprecatedAliasesWorking()
- {
- $this->expectDeprecation('The "deprecated1" service alias is deprecated. You should stop using it, as it will be removed in the future.');
- $this->expectDeprecation('The "deprecated2" service alias is deprecated. You should stop using it, as it will be removed in the future.');
- $container = new ContainerBuilder();
- $container->setDefinition('bar', new Definition('stdClass'))->setPublic(true);
- $container->setAlias('deprecated1', 'bar')->setPublic(true)->setDeprecated('%alias_id% is deprecated');
- $container->setAlias('deprecated2', 'bar')->setPublic(true)->setDeprecated('%alias_id% is deprecated');
- $container->compile();
-
- $dumper = new PhpDumper($container);
- $dump = $dumper->dump(['class' => $class = __FUNCTION__]);
-
- eval('?>'.$dump);
- $container = new $class();
-
- $this->assertInstanceOf(\stdClass::class, $container->get('bar'));
- $this->assertInstanceOf(\stdClass::class, $container->get('deprecated1'));
- $this->assertInstanceOf(\stdClass::class, $container->get('deprecated2'));
- }
-
public function testDumpServiceWithAbstractArgument()
{
$this->expectException(RuntimeException::class);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
index 7521cdb0be140..067db14e9585d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
@@ -91,12 +91,6 @@ public function testDumpAnonymousServices()
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
', $dumper->dump());
@@ -114,12 +108,6 @@ public function testDumpEntities()
foo<>&bar
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
", $dumper->dump());
@@ -144,12 +132,6 @@ public function provideDecoratedServicesData()
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
", include $fixturesPath.'/containers/container15.php'],
@@ -158,12 +140,6 @@ public function provideDecoratedServicesData()
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
", include $fixturesPath.'/containers/container16.php'],
@@ -172,12 +148,6 @@ public function provideDecoratedServicesData()
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The \"%alias_id%\" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
", include $fixturesPath.'/containers/container34.php'],
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/deprecated_without_package_version.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/deprecated_without_package_version.php
deleted file mode 100644
index d0d3aa8455a40..0000000000000
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/deprecated_without_package_version.php
+++ /dev/null
@@ -1,10 +0,0 @@
-services()
- ->set('foo', 'stdClass')
- ->deprecate('%service_id%')
- ;
-};
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_alias_deprecation.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_alias_deprecation.php
deleted file mode 100644
index b9369172a2b43..0000000000000
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_alias_deprecation.php
+++ /dev/null
@@ -1,21 +0,0 @@
-register('foo', 'stdClass')
- ->setPublic(true)
-;
-
-$container
- ->setAlias('alias_for_foo_deprecated', 'foo')
- ->setDeprecated(true)
- ->setPublic(true);
-
-$container
- ->setAlias('alias_for_foo_non_deprecated', 'foo')
- ->setPublic(true);
-
-return $container;
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot
index e74010809b991..3df289c44f540 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot
@@ -3,5 +3,5 @@ digraph sc {
node [fontsize="11" fontname="Arial" shape="record"];
edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot
index 9fdf341062dbf..827eb71feb63f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot
@@ -3,7 +3,7 @@ digraph sc {
node [fontsize="13" fontname="Verdana" shape="square"];
edge [fontsize="12" fontname="Verdana" color="white" arrowhead="closed" arrowsize="1"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=square, fillcolor="grey", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=square, fillcolor="grey", style="filled"];
node_foo [label="foo\nFooClass\n", shape=square, fillcolor="grey", style="filled"];
node_bar [label="bar\n\n", shape=square, fillcolor="red", style="empty"];
node_foo -> node_bar [label="" style="filled"];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot
index 309388eac6f22..f7072c62e49d9 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot
@@ -3,7 +3,7 @@ digraph sc {
node [fontsize="11" fontname="Arial" shape="record"];
edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_foo [label="foo\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_bar [label="bar\n\n", shape=record, fillcolor="#ff9999", style="filled"];
node_foo -> node_bar [label="" style="filled"];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot
index e74010809b991..3df289c44f540 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot
@@ -3,5 +3,5 @@ digraph sc {
node [fontsize="11" fontname="Arial" shape="record"];
edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot
index e177fae2aac25..3238e692212f0 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot
@@ -3,6 +3,6 @@ digraph sc {
node [fontsize="11" fontname="Arial" shape="record"];
edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_foo [label="foo\n%foo.class%\n", shape=record, fillcolor="#eeeeee", style="filled"];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot
index 994506f25a4b4..74af3cc094111 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot
@@ -3,7 +3,7 @@ digraph sc {
node [fontsize="11" fontname="Arial" shape="record"];
edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_foo [label="foo (alias_for_foo)\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_foo_baz [label="foo.baz\nBazClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_bar [label="bar\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services_inline.dot b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services_inline.dot
index b430b186d70e8..5c5940af8f4a7 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services_inline.dot
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services_inline.dot
@@ -3,7 +3,7 @@ digraph sc {
node [fontsize="11" fontname="Arial" shape="record"];
edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
- node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
+ node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_foo [label="foo\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_bar [label="bar\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
node_foo -> node_bar [label="" style="filled"];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/container_alias_deprecation.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/container_alias_deprecation.php
deleted file mode 100644
index 65fa0808d3eef..0000000000000
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/container_alias_deprecation.php
+++ /dev/null
@@ -1,70 +0,0 @@
-services = $this->privates = [];
- $this->methodMap = [
- 'foo' => 'getFooService',
- 'alias_for_foo_deprecated' => 'getAliasForFooDeprecatedService',
- ];
- $this->aliases = [
- 'alias_for_foo_non_deprecated' => 'foo',
- ];
- }
-
- public function compile(): void
- {
- throw new LogicException('You cannot compile a dumped container that was already compiled.');
- }
-
- public function isCompiled(): bool
- {
- return true;
- }
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
- /**
- * Gets the public 'foo' shared service.
- *
- * @return \stdClass
- */
- protected function getFooService()
- {
- return $this->services['foo'] = new \stdClass();
- }
-
- /**
- * Gets the public 'alias_for_foo_deprecated' alias.
- *
- * @return object The "foo" service.
- */
- protected function getAliasForFooDeprecatedService()
- {
- trigger_deprecation('', '', 'The "alias_for_foo_deprecated" service alias is deprecated. You should stop using it, as it will be removed in the future.');
-
- return $this->get('foo');
- }
-}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php
index cec79725f7319..c8554ec9cd3bf 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php
@@ -37,12 +37,4 @@ public function isCompiled(): bool
{
return true;
}
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php
index 31ac1d32b82bd..bc5d07a3e298c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php
@@ -34,12 +34,4 @@ public function isCompiled(): bool
{
return true;
}
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php
index f64250f7b1e7f..0163d9eb7a9ca 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php
@@ -37,12 +37,4 @@ public function isCompiled(): bool
{
return true;
}
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php
index 32c6ffda4b562..97eb8cb4e6faa 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php
@@ -34,12 +34,4 @@ public function isCompiled(): bool
{
return true;
}
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php
index 6cd3102ce9ff1..8a5863add3e60 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php
@@ -34,12 +34,4 @@ public function isCompiled(): bool
{
return true;
}
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php
index 4ec13c2b832e3..bcf023acd2b2f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php
@@ -32,12 +32,4 @@ public function isCompiled(): bool
{
return true;
}
-
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php
index 3299552cb6a38..dc482590b0d83 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php
@@ -38,14 +38,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'test' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt
index ee674249b6844..911c8ffe87358 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt
@@ -5,8 +5,6 @@ Array
namespace Container%s;
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'bar' => true,
];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php
index ac48497f24de6..ba6a1102e041e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php
@@ -38,14 +38,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'test' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php
index a99a61733bd7f..d059de1e186e4 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php
@@ -39,8 +39,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'foo' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php
index 0411a2710d301..f69eada9dc68e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php
@@ -39,14 +39,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'service_from_anonymous_factory' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php
index 0c2a5b38abfe3..7a74449220080 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php
@@ -36,14 +36,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'foo' shared autowired service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php
index bbb572eabbaa7..871f0400a0fb6 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php
@@ -39,14 +39,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'bar' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php
index 145b7db457a30..e740e31dbdc3c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php
@@ -37,14 +37,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'Bar\Foo' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php
index 097f8f86d5193..3c1218d6ac3d2 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt
index 6d2c34a024ba3..bcfe8b71db859 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt
@@ -5,8 +5,6 @@ Array
namespace Container%s;
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'configurator_service' => true,
'configurator_service_simple' => true,
'decorated.pif-pouf' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php
index 1436a1a12f697..113f70fef523d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php
@@ -70,8 +70,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'configurator_service' => true,
'configurator_service_simple' => true,
'decorated.pif-pouf' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_inlined_factories.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_inlined_factories.txt
index 41fdf2a5ea1c3..268032c5d497d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_inlined_factories.txt
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_inlined_factories.txt
@@ -5,8 +5,6 @@ Array
namespace Container%s;
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'configurator_service' => true,
'configurator_service_simple' => true,
'decorated.pif-pouf' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt
index 913f4303192ec..f4ef32b0d3aaa 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt
@@ -1,14 +1,5 @@
Array
(
- [Container%s/removed-ids.php] => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
-];
-
[Container%s/ProjectServiceContainer.php] => containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
- }
-
protected function createProxy($class, \Closure $factory)
{
return $factory();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php
index 854203a9296fa..bddd64ee25f8e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php
@@ -45,8 +45,6 @@ public function getRemovedIds(): array
'App\\Processor' => true,
'App\\Registry' => true,
'App\\Schema' => true,
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php
index f20be40568b0b..651ab180577ea 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php
@@ -60,8 +60,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'bar' => true,
'bar5' => true,
'bar6' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php
index 666ac0a876995..57df70800e11a 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php
@@ -81,8 +81,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'bar2' => true,
'bar6' => true,
'config' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php
index c117396b6ccc7..c9231b1567ce4 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php
@@ -38,14 +38,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'bar' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php
index 00fe01460fa5c..c673b608ebfbc 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php
index 1c1cc9ffd8c4f..405fbdca98164 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
index 18125c01b62ae..87e7260a983fb 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
@@ -37,14 +37,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
protected function createProxy($class, \Closure $factory)
{
return $factory();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php
index 53b7dba204fa3..6debfd0774eb1 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php
@@ -40,8 +40,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_default_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_default_env.php
index 778d526669736..c92fd754e910e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_default_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_default_env.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php
index fbcb43ff4b944..c434453966d7f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php
@@ -42,8 +42,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'bar_%env(BAR)%' => true,
'baz_%env(BAR)%' => true,
];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php
index f53a5c903392e..a9c6d8cf8f48d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php
@@ -70,8 +70,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'configurator_service' => true,
'configurator_service_simple' => true,
'decorated.pif-pouf' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php
index 21ab8be6090b4..65bf567b35d7c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php
@@ -50,8 +50,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php
index 708a508f9cf5e..5d8fd7d2707f7 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php
@@ -36,14 +36,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'App\Foo' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php
index 474e89fa10cf6..1e74f10e38b94 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php
index c35cfcdf0fa0b..b4d26ddfde161 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php
@@ -46,8 +46,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'baz_service' => true,
'translator.loader_1_locator' => true,
'translator.loader_2_locator' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php
index b9a1903beab54..8ee15edeb4608 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php
@@ -43,8 +43,6 @@ public function getRemovedIds(): array
{
return [
'.service_locator.mtT6G8y' => true,
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'foo' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php
index ab3e1bd6df577..e60c8f0223ab2 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php
@@ -39,8 +39,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'foo' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt
index 0a5dd641228b3..4b7a9e47a61ba 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt
@@ -1,14 +1,5 @@
Array
(
- [Container%s/removed-ids.php] => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
-];
-
[Container%s/getNonSharedFooService.php] => containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
- }
-
protected function load($file, $lazyLoad = true)
{
if (class_exists($class = __NAMESPACE__.'\\'.$file, false)) {
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php
index 4ff65d956f554..9c38d36a2c820 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php
@@ -40,8 +40,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'baz_service' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php
index 6155a13d7ee99..0a6925a967caf 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php
@@ -39,8 +39,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'private_bar' => true,
'private_foo' => true,
];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_query_string_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_query_string_env.php
index 7da3b4688dc9d..b1af92c5f35f9 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_query_string_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_query_string_env.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php
index 0bb94cf01ff74..5d9a6f4cf8a7a 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php
@@ -45,8 +45,6 @@ public function getRemovedIds(): array
{
return [
'.service_locator.PWbaRiJ' => true,
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php
index bf4679612342e..3d716d4a5c927 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php
@@ -46,8 +46,6 @@ public function getRemovedIds(): array
{
return [
'.service_locator.ZP1tNYN' => true,
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'foo2' => true,
'foo3' => true,
'foo4' => true,
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php
index 5cf39764b51cb..cc2cdd2a99fa6 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php
@@ -47,8 +47,6 @@ public function getRemovedIds(): array
'.service_locator.DlIAmAe' => true,
'.service_locator.DlIAmAe.foo_service' => true,
'.service_locator.t5IGRMW' => true,
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber_php81.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber_php81.php
index 0d06b05ba871c..160d21f407947 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber_php81.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber_php81.php
@@ -47,8 +47,6 @@ public function getRemovedIds(): array
'.service_locator.JmEob1b' => true,
'.service_locator.JmEob1b.foo_service' => true,
'.service_locator.KIgkoLM' => true,
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php
index 9c772391286f2..956bac8fb81e3 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php
@@ -40,8 +40,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php
index a9100c52e2faa..4cd5f0ea0f73b 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php
@@ -41,8 +41,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'foo2' => true,
'foo3' => true,
];
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_unsupported_characters.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_unsupported_characters.php
index ab1598ebbff8b..88a0b92825dfe 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_unsupported_characters.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_unsupported_characters.php
@@ -40,14 +40,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* Gets the public 'bar$' shared service.
*
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_url_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_url_env.php
index 072c50f244dd5..160d4ef5f6a29 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_url_env.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_url_env.php
@@ -35,14 +35,6 @@ public function isCompiled(): bool
return true;
}
- public function getRemovedIds(): array
- {
- return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
- ];
- }
-
/**
* @return array|bool|float|int|string|null
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php
index 79f2e8dfe3a1f..869e6af975d10 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php
@@ -39,8 +39,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_staticreturntype.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_staticreturntype.php
index 9e46bf28b3c6d..8f8b5cb4f100f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_staticreturntype.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_staticreturntype.php
@@ -39,8 +39,6 @@ public function isCompiled(): bool
public function getRemovedIds(): array
{
return [
- 'Psr\\Container\\ContainerInterface' => true,
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
'Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo' => true,
];
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml
index c6d87aa1a9a48..32e1f4f5d63e5 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml
@@ -2,11 +2,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml
index dad65bfb3fe47..f46cef90f2cc9 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml
@@ -18,11 +18,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml
index 978cd96566822..3fc1fcd35e828 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml
@@ -3,11 +3,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml
index 906958d622a2b..43ab7e3a3996c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml
@@ -34,11 +34,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml
index ecae10e4051cc..0051808007a43 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml
@@ -153,12 +153,6 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_abstract.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_abstract.xml
index d8e329946e723..7844bff4264f0 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_abstract.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_abstract.xml
@@ -3,11 +3,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_deprecated_without_package_and_version.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_deprecated_without_package_and_version.xml
deleted file mode 100644
index 5051e3a766a85..0000000000000
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_deprecated_without_package_and_version.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- The "%service_id%" service is deprecated.
-
-
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_dump_load.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_dump_load.xml
index 56b3dc385fc35..20a4e6e80e304 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_dump_load.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_dump_load.xml
@@ -5,11 +5,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_abstract_argument.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_abstract_argument.xml
index 2423807dd0ef1..755fdb72519c9 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_abstract_argument.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_abstract_argument.xml
@@ -6,11 +6,5 @@
should be defined by Pass
test
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_service_closure.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_service_closure.xml
index a202b33249b98..c488a561cd758 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_service_closure.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_service_closure.xml
@@ -5,11 +5,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_tagged_arguments.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_tagged_arguments.xml
index fbeb4688ec507..e4c62800245ce 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_tagged_arguments.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_tagged_arguments.xml
@@ -11,11 +11,5 @@
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
-
- The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
-
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml
index c8d12082e19be..a7f403b788936 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml
@@ -3,15 +3,3 @@ services:
class: Symfony\Component\DependencyInjection\ContainerInterface
public: true
synthetic: true
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml
index 19882cffdb2aa..0d3ef96bc9a92 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml
@@ -8,15 +8,3 @@ services:
class: Foo
public: true
autowire: true
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services34.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services34.yml
index 5dadb6cb1d52e..de4e71e4808fa 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services34.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services34.yml
@@ -9,15 +9,3 @@ services:
decoration_inner_name: decorated.inner
decoration_priority: 1
decoration_on_invalid: null
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml
index c410214e54c2b..9be3e0719ae1d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml
@@ -23,15 +23,3 @@ services:
class: Symfony\Component\DependencyInjection\ContainerInterface
public: true
synthetic: true
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml
index b202a8d7f681f..9a78ebe4d6a9d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml
@@ -160,18 +160,6 @@ services:
arguments:
- !tagged_iterator foo
public: true
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
alias_for_foo:
alias: 'foo'
public: true
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_dump_load.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_dump_load.yml
index 6e6dfc6220e3e..ac7ee3954fd28 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_dump_load.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_dump_load.yml
@@ -8,15 +8,3 @@ services:
autoconfigure: true
abstract: true
arguments: ['@!bar']
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_inline.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_inline.yml
index cb4fda7ca6345..8df237b4a11c1 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_inline.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_inline.yml
@@ -8,15 +8,3 @@ services:
class: Class1
public: true
arguments: [!service { class: Class2, arguments: [!service { class: Class2 }] }]
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_abstract_argument.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_abstract_argument.yml
index 158998fdd5020..5f501272aed01 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_abstract_argument.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_abstract_argument.yml
@@ -7,15 +7,3 @@ services:
Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument:
class: Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument
arguments: { $baz: !abstract 'should be defined by Pass', $bar: test }
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_service_closure.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_service_closure.yml
index 98e1996d7293a..cdcafe20978ca 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_service_closure.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_service_closure.yml
@@ -7,15 +7,3 @@ services:
foo:
class: Foo
arguments: [!service_closure '@?bar']
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_tagged_argument.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_tagged_argument.yml
index db062fe2682ac..d3c1e591daf60 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_tagged_argument.yml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_tagged_argument.yml
@@ -17,15 +17,3 @@ services:
bar_service_tagged_locator:
class: Bar
arguments: [!tagged_locator foo]
- Psr\Container\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
- Symfony\Component\DependencyInjection\ContainerInterface:
- alias: service_container
- deprecated:
- package: symfony/dependency-injection
- version: 5.1
- message: The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
index 04dc879ef03b8..1b0d5e3d34375 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
@@ -101,14 +101,7 @@ public function testRegisterClasses()
['service_container', Bar::class],
array_keys($container->getDefinitions())
);
- $this->assertEquals(
- [
- PsrContainerInterface::class,
- ContainerInterface::class,
- BarInterface::class,
- ],
- array_keys($container->getAliases())
- );
+ $this->assertEquals([BarInterface::class], array_keys($container->getAliases()));
}
public function testRegisterClassesWithExclude()
@@ -130,14 +123,7 @@ public function testRegisterClassesWithExclude()
$this->assertFalse($container->has(Foo::class));
$this->assertFalse($container->has(DeeperBaz::class));
- $this->assertEquals(
- [
- PsrContainerInterface::class,
- ContainerInterface::class,
- BarInterface::class,
- ],
- array_keys($container->getAliases())
- );
+ $this->assertEquals([BarInterface::class], array_keys($container->getAliases()));
$loader->registerClasses(
new Definition(),
@@ -179,14 +165,7 @@ public function testNestedRegisterClasses()
$this->assertTrue($container->has(Baz::class));
$this->assertTrue($container->has(Foo::class));
- $this->assertEquals(
- [
- PsrContainerInterface::class,
- ContainerInterface::class,
- FooInterface::class,
- ],
- array_keys($container->getAliases())
- );
+ $this->assertEquals([FooInterface::class], array_keys($container->getAliases()));
$alias = $container->getAlias(FooInterface::class);
$this->assertSame(Foo::class, (string) $alias);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
index 90f1caec2c96b..e91a82328ab2f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
@@ -153,18 +153,6 @@ public function testEnvConfigurator()
$this->assertSame('%env(int:CCC)%', $container->getDefinition('foo')->getArgument(0));
}
- /**
- * @group legacy
- */
- public function testDeprecatedWithoutPackageAndVersion()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: The signature of method "Symfony\Component\DependencyInjection\Loader\Configurator\Traits\DeprecateTrait::deprecate()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.');
-
- $fixtures = realpath(__DIR__.'/../Fixtures');
- $loader = new PhpFileLoader($container = new ContainerBuilder(), new FileLocator());
- $loader->load($fixtures.'/config/deprecated_without_package_version.php');
- }
-
public function testNestedBundleConfigNotAllowed()
{
$fixtures = realpath(__DIR__.'/../Fixtures');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
index 2c9d8e6db2767..341b997882037 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
@@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Loader;
use PHPUnit\Framework\TestCase;
-use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
use Symfony\Component\Config\Exception\LoaderLoadException;
use Symfony\Component\Config\FileLocator;
@@ -48,8 +47,6 @@
class XmlFileLoaderTest extends TestCase
{
- use ExpectDeprecationTrait;
-
protected static $fixturesPath;
public static function setUpBeforeClass(): void
@@ -454,24 +451,6 @@ public function testDeprecated()
$this->assertSame($message, $container->getDefinition('bar')->getDeprecation('bar')['message']);
}
- /**
- * @group legacy
- */
- public function testDeprecatedWithoutPackageAndVersion()
- {
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: Not setting the attribute "package" of the node "deprecated" in "%s" is deprecated.');
-
- $container = new ContainerBuilder();
- $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
- $loader->load('services_deprecated_without_package_and_version.xml');
-
- $this->assertTrue($container->getDefinition('foo')->isDeprecated());
- $deprecation = $container->getDefinition('foo')->getDeprecation('foo');
- $this->assertSame('The "foo" service is deprecated.', $deprecation['message']);
- $this->assertSame('', $deprecation['package']);
- $this->assertSame('', $deprecation['version']);
- }
-
public function testDeprecatedAliases()
{
$container = new ContainerBuilder();
@@ -487,22 +466,14 @@ public function testDeprecatedAliases()
$this->assertSame($message, $container->getAlias('alias_for_foobar')->getDeprecation('alias_for_foobar')['message']);
}
- /**
- * @group legacy
- */
public function testDeprecatedAliaseWithoutPackageAndVersion()
{
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: Not setting the attribute "package" of the node "deprecated" in "%s" is deprecated.');
-
$container = new ContainerBuilder();
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
- $loader->load('deprecated_alias_definitions_without_package_and_version.xml');
- $this->assertTrue($container->getAlias('alias_for_foo')->isDeprecated());
- $deprecation = $container->getAlias('alias_for_foo')->getDeprecation('alias_for_foo');
- $this->assertSame('The "alias_for_foo" service alias is deprecated. You should stop using it, as it will be removed in the future.', $deprecation['message']);
- $this->assertSame('', $deprecation['package']);
- $this->assertSame('', $deprecation['version']);
+ $this->expectException(InvalidArgumentException::class);
+ $this->expectExceptionMessageMatches('/^Missing attribute "package" at node "deprecated" in "[^"]*".$/');
+ $loader->load('deprecated_alias_definitions_without_package_and_version.xml');
}
public function testConvertDomElementToArray()
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
index 55b0a8acb53c0..c855c8140ac02 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
@@ -295,24 +295,14 @@ public function testDeprecatedAliases()
$this->assertSame('1.1', $deprecation['version']);
}
- /**
- * @group legacy
- */
public function testDeprecatedAliasesWithoutPackageAndVersion()
{
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: Not setting the attribute "package" of the "deprecated" option in "%s" is deprecated.');
- $this->expectDeprecation('Since symfony/dependency-injection 5.1: Not setting the attribute "version" of the "deprecated" option in "%s" is deprecated.');
-
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml'));
- $loader->load('deprecated_alias_definitions_without_package_and_version.yml');
- $this->assertTrue($container->getAlias('alias_for_foobar')->isDeprecated());
- $message = 'The "alias_for_foobar" service alias is deprecated.';
- $deprecation = $container->getAlias('alias_for_foobar')->getDeprecation('alias_for_foobar');
- $this->assertSame($message, $deprecation['message']);
- $this->assertSame('', $deprecation['package']);
- $this->assertSame('', $deprecation['version']);
+ $this->expectException(InvalidArgumentException::class);
+ $this->expectExceptionMessageMatches('/^Missing attribute "package" of the "deprecated" option in "[^"]*".$/');
+ $loader->load('deprecated_alias_definitions_without_package_and_version.yml');
}
public function testFactorySyntaxError()