Skip to content

Commit 2a89649

Browse files
committed
[DependencyInjection] Add abstract_arg
1 parent 3acc28f commit 2a89649

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

14+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1415
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
1516
use Symfony\Component\DependencyInjection\Definition;
1617
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
@@ -85,6 +86,7 @@ public static function processValue($value, $allowServices = false)
8586
case $value instanceof Definition:
8687
case $value instanceof Expression:
8788
case $value instanceof Parameter:
89+
case $value instanceof AbstractArgument:
8890
case $value instanceof Reference:
8991
if ($allowServices) {
9092
return $value;

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

14+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1415
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1516
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
1617
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
@@ -153,3 +154,11 @@ function expr(string $expression): Expression
153154
{
154155
return new Expression($expression);
155156
}
157+
158+
/**
159+
* Creates an abstract argument.
160+
*/
161+
function abstract_arg(string $description): AbstractArgument
162+
{
163+
return new AbstractArgument($description);
164+
}

0 commit comments

Comments
 (0)