10000 minor #31967 [DI] remove deprecated tag !tagged in favor of !tagged_i… · symfony/symfony@e8c2a1b · GitHub
[go: up one dir, main page]

Skip to content

Commit e8c2a1b

Browse files
minor #31967 [DI] remove deprecated tag !tagged in favor of !tagged_iterator (jschaedl)
This PR was merged into the 5.0-dev branch. Discussion ---------- [DI] remove deprecated tag !tagged in favor of !tagged_iterator | Q | A | ------------- | --- | Branch? | master <!-- see below --> | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | yes <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | related ticket #31289 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#tbd <!-- required for new features --> This PR removes tag `tagged` which was deprecated in #31321 Commits ------- 9978184 [DI] removed tagged
2 parents e7ce055 + 9978184 commit e8c2a1b

File tree

5 files changed

+2
-22
lines changed

5 files changed

+2
-22
lines changed

src/Symfony/Component/DependencyInjection/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CHANGELOG
1111
* removed support for short factory/configurator syntax from `YamlFileLoader`
1212
* removed `ResettableContainerInterface`, use `ResetInterface` instead
1313
* added argument `$returnsClone` to `Definition::addMethodCall()`
14+
* removed `tagged`, use `tagged_iterator` instead
1415

1516
4.4.0
1617
-----

src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,6 @@ function iterator(array $values): IteratorArgument
113113
return new IteratorArgument(AbstractConfigurator::processValue($values, true));
114114
}
115115

116-
/**
117-
* Creates a lazy iterator by tag name.
118-
*
119-
* @deprecated since Symfony 4.4, to be removed in 5.0, use "tagged_iterator" instead.
120-
*/
121-
function tagged(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null): TaggedIteratorArgument
122-
{
123-
@trigger_error(__NAMESPACE__.'\tagged() is deprecated since Symfony 4.4 and will be removed in 5.0, use '.__NAMESPACE__.'\tagged_iterator() instead.', E_USER_DEPRECATED);
124-
125-
return new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod);
126-
}
127-
128116
/**
129117
* Creates a lazy iterator by tag name.
130118
*/

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,6 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $file, $lowercase =
544544
throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service_locator" only accepts maps of type="service" references in "%s".', $name, $file));
545545
}
546546
break;
547-
case 'tagged':
548-
@trigger_error(sprintf('Type "%s" of tag <%s> in "%s" is deprecated since Symfony 4.4 and will be removed in 5.0, use "tagged_iterator" instead.', $arg->getAttribute('type'), $name, $file), E_USER_DEPRECATED);
549-
// no break
550547
case 'tagged_iterator':
551548
case 'tagged_locator':
552549
$type = $arg->getAttribute('type');

src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -717,11 +717,7 @@ private function resolveServices($value, $file, $isParameter = false)
717717
throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps of "@service" references in "%s".', $file));
718718
}
719719
}
720-
if (\in_array($value->getTag(), ['tagged', 'tagged_iterator', 'tagged_locator'], true)) {
721-
if ('tagged' === $value->getTag()) {
722-
@trigger_error('"!tagged" is deprecated since Symfony 4.4 and will be removed in 5.0, use "!tagged_iterator" instead.', E_USER_DEPRECATED);
723-
}
724-
720+
if (\in_array($value->getTag(), ['tagged_iterator', 'tagged_locator'], true)) {
725721
$forLocator = 'tagged_locator' === $value->getTag();
726722

727723
if (\is_string($argument) && $argument) {

src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,6 @@
264264
<xsd:enumeration value="constant" />
265265
<xsd:enumeration value="iterator" />
266266
<xsd:enumeration value="service_locator" />
267-
<!-- "tagged" is deprecated since Symfony 4.4 and will be removed in 5.0, use "tagged_iterator" instead. -->
268-
<xsd:enumeration value="tagged" />
269267
<xsd:enumeration value="tagged_iterator" />
270268
<xsd:enumeration value="tagged_locator" />
271269
</xsd:restriction>

0 commit comments

Comments
 (0)
0