throw new InvalidArgumentException(sprintf('Missing attribute "package" at node "deprecated" in "%s".',
$file));
} if (!
$deprecated[0
]->
hasAttribute('version'
)) { throw new InvalidArgumentException(sprintf('Missing attribute "version" at node "deprecated" in "%s".',
$file));
} $definition->
setDeprecated($package,
$version,
$message);
} $definition->
setArguments($this->
getArgumentsAsPhp($service, 'argument',
$file,
$definition instanceof ChildDefinition
));
$definition->
setProperties($this->
getArgumentsAsPhp($service, 'property',
$file));
if ($factories =
$this->
getChildren($service, 'factory'
)) { $factory =
$factories[0
];
if ($function =
$factory->
getAttribute('function'
)) { $definition->
setFactory($function);
} elseif ($expression =
$factory->
getAttribute('expression'
)) { if (!
class_exists(Expression::
class)) { throw new \
LogicException('The "expression" attribute cannot be used on factories without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'
);
} $definition->
setFactory('@='.
$expression);
} else {