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 https://github.com/symfony/symfony/pull/31321
Commits
-------
997818406a
[DI] removed tagged
This commit is contained in:
commit
e8c2a1b807
@ -11,6 +11,7 @@ CHANGELOG
|
|||||||
* removed support for short factory/configurator syntax from `YamlFileLoader`
|
* removed support for short factory/configurator syntax from `YamlFileLoader`
|
||||||
* removed `ResettableContainerInterface`, use `ResetInterface` instead
|
* removed `ResettableContainerInterface`, use `ResetInterface` instead
|
||||||
* added argument `$returnsClone` to `Definition::addMethodCall()`
|
* added argument `$returnsClone` to `Definition::addMethodCall()`
|
||||||
|
* removed `tagged`, use `tagged_iterator` instead
|
||||||
|
|
||||||
4.4.0
|
4.4.0
|
||||||
-----
|
-----
|
||||||
|
@ -113,18 +113,6 @@ function iterator(array $values): IteratorArgument
|
|||||||
return new IteratorArgument(AbstractConfigurator::processValue($values, true));
|
return new IteratorArgument(AbstractConfigurator::processValue($values, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a lazy iterator by tag name.
|
|
||||||
*
|
|
||||||
* @deprecated since Symfony 4.4, to be removed in 5.0, use "tagged_iterator" instead.
|
|
||||||
*/
|
|
||||||
function tagged(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null): TaggedIteratorArgument
|
|
||||||
{
|
|
||||||
@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);
|
|
||||||
|
|
||||||
return new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a lazy iterator by tag name.
|
* Creates a lazy iterator by tag name.
|
||||||
*/
|
*/
|
||||||
|
@ -544,9 +544,6 @@ class XmlFileLoader extends FileLoader
|
|||||||
throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service_locator" only accepts maps of type="service" references in "%s".', $name, $file));
|
throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service_locator" only accepts maps of type="service" references in "%s".', $name, $file));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'tagged':
|
|
||||||
@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);
|
|
||||||
// no break
|
|
||||||
case 'tagged_iterator':
|
case 'tagged_iterator':
|
||||||
case 'tagged_locator':
|
case 'tagged_locator':
|
||||||
$type = $arg->getAttribute('type');
|
$type = $arg->getAttribute('type');
|
||||||
|
@ -717,11 +717,7 @@ class YamlFileLoader extends FileLoader
|
|||||||
throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps of "@service" references in "%s".', $file));
|
throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps of "@service" references in "%s".', $file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (\in_array($value->getTag(), ['tagged', 'tagged_iterator', 'tagged_locator'], true)) {
|
if (\in_array($value->getTag(), ['tagged_iterator', 'tagged_locator'], true)) {
|
||||||
if ('tagged' === $value->getTag()) {
|
|
||||||
@trigger_error('"!tagged" is deprecated since Symfony 4.4 and will be removed in 5.0, use "!tagged_iterator" instead.', E_USER_DEPRECATED);
|
|
||||||
}
|
|
||||||
|
|
||||||
$forLocator = 'tagged_locator' === $value->getTag();
|
$forLocator = 'tagged_locator' === $value->getTag();
|
||||||
|
|
||||||
if (\is_string($argument) && $argument) {
|
if (\is_string($argument) && $argument) {
|
||||||
|
@ -264,8 +264,6 @@
|
|||||||
<xsd:enumeration value="constant" />
|
<xsd:enumeration value="constant" />
|
||||||
<xsd:enumeration value="iterator" />
|
<xsd:enumeration value="iterator" />
|
||||||
<xsd:enumeration value="service_locator" />
|
<xsd:enumeration value="service_locator" />
|
||||||
<!-- "tagged" is deprecated since Symfony 4.4 and will be removed in 5.0, use "tagged_iterator" instead. -->
|
|
||||||
<xsd:enumeration value="tagged" />
|
|
||||||
<xsd:enumeration value="tagged_iterator" />
|
<xsd:enumeration value="tagged_iterator" />
|
||||||
<xsd:enumeration value="tagged_locator" />
|
<xsd:enumeration value="tagged_locator" />
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
|
Reference in New Issue
Block a user