Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -85,6 +86,7 @@ public static function processValue($value, $allowServices = false)
case $value instanceof Definition:
case $value instanceof Expression:
case $value instanceof Parameter:
case $value instanceof AbstractArgument:
case $value instanceof Reference:
if ($allowServices) {
return $value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
Expand Down Expand Up @@ -82,6 +83,14 @@ final public function withPath(string $path): self
}
}

/**
* Creates a parameter.
*/
function param(string $name): string
{
return '%'.$name.'%';
}

/**
* Creates a service reference.
*
Expand Down Expand Up @@ -165,3 +174,11 @@ function expr(string $expression): Expression
{
return new Expression($expression);
}

/**
* Creates an abstract argument.
*/
function abstract_arg(string $description): AbstractArgument
{
return new AbstractArgument($description);
}