[DI] removed tagged
This commit is contained in:
parent
e7ce055e13
commit
997818406a
@ -11,6 +11,7 @@ CHANGELOG
|
||||
* removed support for short factory/configurator syntax from `YamlFileLoader`
|
||||
* removed `ResettableContainerInterface`, use `ResetInterface` instead
|
||||
* added argument `$returnsClone` to `Definition::addMethodCall()`
|
||||
* removed `tagged`, use `tagged_iterator` instead
|
||||
|
||||
4.4.0
|
||||
-----
|
||||
|
@ -113,18 +113,6 @@ function iterator(array $values): IteratorArgument
|
||||
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.
|
||||
*/
|
||||
|
@ -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));
|
||||
}
|
||||
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_locator':
|
||||
$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));
|
||||
}
|
||||
}
|
||||
if (\in_array($value->getTag(), ['tagged', '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);
|
||||
}
|
||||
|
||||
if (\in_array($value->getTag(), ['tagged_iterator', 'tagged_locator'], true)) {
|
||||
$forLocator = 'tagged_locator' === $value->getTag();
|
||||
|
||||
if (\is_string($argument) && $argument) {
|
||||
|
@ -264,8 +264,6 @@
|
||||
<xsd:enumeration value="constant" />
|
||||
<xsd:enumeration value="iterator" />
|
||||
<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_locator" />
|
||||
</xsd:restriction>
|
||||
|
Reference in New Issue
Block a user