8000 Extract the ArgumentResolver system to its own component by chalasr · Pull Request #59794 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Extract the ArgumentResolver system to its own component #59794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 7.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Experimenting ways to abstract the input source
  • Loading branch information
chalasr committed Mar 23, 2025
commit f28fb52d757ef80c69bcce358764fe1e0b7a8fc4
4 changes: 2 additions & 2 deletions src/Symfony/Component/ArgumentResolver/ArgumentResolver.php
8000
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;

/**
* Responsible for resolving the arguments passed to an action.
* Responsible for resolving the arguments passed to a callable.
*
* @author Iltar van der Berg <kjarli@gmail.com>
* @author Robin Chalas <robin@baksla.sh>
Expand All @@ -47,11 +47,11 @@
$this->argumentValueResolvers = $argumentValueResolvers ?: static::getDefaultValueResolvers();
}

public function getArguments(mixed $input, callable $callable, ?\ReflectionFunctionAbstract $reflector = null): array

Check failure on line 50 in src/Symfony/Component/ArgumentResolver/ArgumentResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

ParamNameMismatch

src/Symfony/Component/ArgumentResolver/ArgumentResolver.php:50:40: ParamNameMismatch: Argument 1 of Symfony\Component\ArgumentR 8000 esolver\ArgumentResolver::getArguments has wrong name $input, expecting $source as defined by Symfony\Component\ArgumentResolver\ArgumentResolverInterface::getArguments (see https://psalm.dev/230)

Check failure on line 50 in src/Symfony/Component/ArgumentResolver/ArgumentResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

ParamNameMismatch

src/Symfony/Component/ArgumentResolver/ArgumentResolver.php:50:40: ParamNameMismatch: Argument 1 of Symfony\Component\ArgumentResolver\ArgumentResolver::getArguments has wrong name $input, expecting $source as defined by Symfony\Component\ArgumentResolver\ArgumentResolverInterface::getArguments (see https://psalm.dev/230)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function getArguments(mixed $input, callable $callable, ?\ReflectionFunctionAbstract $reflector = null): array
final public function getArguments(mixed $input, callable $callable, ?\ReflectionFunctionAbstract $reflector = null): array

If don't think we want this to be overridden.

For the ControllerArgumentResolver::getArguments, maybe we can create a new abstract protected getSubject (or any other name) method to fit with a template-method-like design pattern?

{
$arguments = [];

foreach ($this->argumentMetadataFactory->createArgumentMetadata($callable, $reflector) as $metadata) {

Check failure on line 54 in src/Symfony/Component/ArgumentResolver/ArgumentResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidArgument

src/Symfony/Component/ArgumentResolver/ArgumentResolver.php:54:73: InvalidArgument: Argument 1 of Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadataFactoryInterface::createArgumentMetadata expects array<array-key, mixed>|object|string, but callable provided (see https://psalm.dev/004)

Check failure on line 54 in src/Symfony/Component/ArgumentResolver/ArgumentResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidArgument

src/Symfony/Component/ArgumentResolver/ArgumentResolver.php:54:73: InvalidArgument: Argument 1 of Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadataFactoryInterface::createArgumentMetadata expects array<array-key, mixed>|object|string, but callable provided (see https://psalm.dev/004)
$argumentValueResolvers = $this->argumentValueResolvers;
$disabledResolvers = [];

Expand Down Expand Up @@ -140,6 +140,6 @@
*/
protected function callResolver($resolver, ArgumentMetadata $metadata, mixed $input): iterable
{
return $resolver->resolve($metadata, $input);
return $resolver->resolveArgument($metadata, $input);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace Symfony\Component\ArgumentResolver;


use Symfony\Component\ArgumentResolver\ArgumentValueSource\ValueSourceInterface;

/**
* An ArgumentResolverInterface instance knows how to determine the
* arguments for a specific function.
Expand All @@ -27,5 +30,5 @@
*
* @throws \RuntimeException When no value could be provided for a required argument
*/
public function getArguments(mixed $input, callable $callable, ?\ReflectionFunctionAbstract $reflector = null): array;
public function getArguments(ValueSourceInterface $source, callable $callable, ?\ReflectionFunctionAbstract $reflector = null): array;

Check failure on line 33 in src/Symfony/Component/ArgumentResolver/ArgumentResolverInterface.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedClass

src/Symfony/Component/ArgumentResolver/ArgumentResolverInterface.php:33:34: UndefinedClass: Class, interface or enum named Symfony\Component\ArgumentResolver\ArgumentValueSource\ValueSourceInterface does not exist (see https://psalm.dev/019)

Check failure on line 33 in src/Symfony/Component/ArgumentResolver/ArgumentResolverInterface.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedClass

src/Symfony/Component/ArgumentResolver/ArgumentResolverInterface.php:33:34: UndefinedClass: Class, interface or enum named Symfony\Component\ArgumentResolver\ArgumentValueSource\ValueSourceInterface does not exist (see https://psalm.dev/019)
}
32 changes: 31 additions & 1 deletion src/Symfony/Component/ArgumentResolver/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
ArgumentResolver Component
========================

The ArgumentResolver component provides
The ArgumentResolver component provides a system that resolves the arguments of a callable based on their metadata and a given input source (e.g. an HTTP Request) at runtime.

```php
<?php

use Symfony\Component\ A3E2 ArgumentResolver\ArgumentResolver;

enum OrderStatus {
case PLACED = 'placed';
case CONFIRMED = 'confirmed';
case IN_TRANSIT = 'transit';
case SHIPPED = 'shipped';
case DELIVERED = 'delivered';
}

final class ChangeOrderStatus
{
public function __invoke(
int $orderId,
OrderRepositoryInterface $OrderStatus $newStatus,
?\DateTimeInterface $deliveryDate = null
) {
// ...
}
}

$arguments = (new ArgumentResolver)->getArguments($ca);



```

Getting Started
---------------
Expand Down
F438
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\ArgumentResolver\ArgumentValueSource;

/**
* Exposes a context-specific input source from which arguments' values can be extracted then resolved.
*
* @author Robin Chalas <robin@baksla.sh>
*/
interface InputSourceInterface
{
/**
* @returns mixed The context-specific source from which to extract arguments' source values e.g. an HTTP request or a CLI input
*/
public function getSource(): mixed;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?php

namespace Symfony\Component\ArgumentResolver;
namespace Symfony\Component\ArgumentResolver\ArgumentValueSource;

/**
* Holds a source value to be resolved to an argument.
*
* @author Robin Chalas <robin@baksla.sh>
*/
final readonly class SourceValue
{
const NOT_FOUND = 'notfound';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
namespace Symfony\Component\ArgumentResolver\ValueResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ValueAccessor\RawValueAccessorInterface;

/**
* Attempt to resolve backed enum cases from request attributes, for a route path parameter,
* Attempts to resolve backed enum cases from request attributes, for a route path parameter,
* leading to a 404 Not Found if the attribute value isn't a valid backing value for the enum type.
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

use Psr\Clock\ClockInterface;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Attribute\MapDateTime;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;

/**
* Convert DateTime instances from request attribute variable.
Expand Down Expand Up @@ -56,7 +56,7 @@
}

if ($value instanceof \DateTimeInterface) {
return [$value instanceof $class ? $value : $class::createFromInterface($value)];

Check failure on line 59 in src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedMethod

src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php:59:57: UndefinedMethod: Method DateTimeInterface::createfrominterface does not exist (see https://psalm.dev/022)

Check failure on line 59 in src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedMethod

src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php:59:57: UndefinedMethod: Method DateTimeInterface::createfrominterface does not exist (see https://psalm.dev/022)
}

$format = null;
Expand All @@ -67,9 +67,9 @@
}

if (null !== $format) {
$date = $class::createFromFormat($format, $value, $this->clock?->now()->getTimeZone());

Check failure on line 70 in src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedMethod

src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php:70:21: UndefinedMethod: Method DateTimeInterface::createfromformat does not exist (see https://psalm.dev/022)

Check failure on line 70 in src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedMethod

src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php:70:21: UndefinedMethod: Method DateTimeInterface::createfromformat does not exist (see https://psalm.dev/022)

if (($class::getLastErrors() ?: ['warning_count' => 0])['warning_count']) {

Check failure on line 72 in src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedMethod

src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php:72:18: UndefinedMethod: Method DateTimeInterface::getlasterrors does not exist (see https://psalm.dev/022)

Check failure on line 72 in src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedMethod

src/Symfony/Component/ArgumentResolver/ValueResolver/DateTimeValueResolver.php:72:18: UndefinedMethod: Method DateTimeInterface::getlasterrors does not exist (see https://psalm.dev/022)
$date = false;
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Component\ArgumentResolver\ValueResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;

/**
* Yields the default value defined in the action signature when no value has been given.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

use Psr\Container\ContainerInterface;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;

/**
* Provides an intuitive error message when controller fails because it is not registered as a service.
*
* @author Simeon Kolev <simeon.kolev9@gmail.com>
*/
final readonly class NotTaggedCallableValueResolver implements ValueResolverInterface
final readonly class NotTaggedServiceValueResolver implements ValueResolverInterface
{
public function __construct(
private ContainerInterface $container,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

use Psr\Container\ContainerInterface;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\NearMissValueResolverException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Symfony\Component\ArgumentResolver\ValueResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\Uid\AbstractUid;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

namespace Symfony\Component\ArgumentResolver\ValueResolver;

use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\Exception\NearMissValueResolverException;

/**
* Responsible for resolving the value of an argument based on its metadata and its source value.
Expand All @@ -25,6 +26,9 @@ interface ValueResolverInterface
{
/**
* Returns the resolved argument value(s).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then:

Suggested change
* Returns the resolved argument value(s).
* Returns the resolved argument value(s).
*
* @return T

*
* @throws InvalidSourceValueException
* @throws NearMissValueResolverException
*/
public function resolveArgument(ArgumentMetadata $argument, SourceValue $value): iterable;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
namespace Symfony\Component\ArgumentResolver\ValueResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidArgumentException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;

/**
* Yields a variadic argument's values from the request attributes.
Expand All @@ -35,6 +34,7 @@ public function resolveArgument(ArgumentMetadata $argument, SourceValue $value):
throw new InvalidArgumentException(\sprintf('Argument "...$%1$s" is required to be an array, source value "%1$s" contains a type of "%2$s" instead.', $argument->getName(), get_debug_type($values)));
}


return $values;
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Component/ArgumentResolver/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</php>

<testsuites>
<testsuite name="Symfony Security Password Component Suite">
<testsuite name="Symfony Argument Resolver Component Suite">
<directory>./Tests/</directory>
</testsuite>
</testsuites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\BackedEnumValueResolver as BaseBackedEnumValueResolver;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\HttpFoundation\Request;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

use Psr\Clock\ClockInterface;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\DateTimeValueResolver as BaseDateTimeValueResolver;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
trigger_deprecation('symfony/http-kernel', '7.3', 'The "%s" class is deprecated, use "%s" instead.', DefaultValueResolver::class, BaseDefaultValueResolver::class);

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\DefaultValueResolver as BaseDefaultValueResolver;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

use Psr\Container\ContainerInterface;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\NotTaggedCallableValueResolver;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\NotTaggedServiceValueResolver;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\HttpFoundation\Request;
Expand All @@ -35,11 +34,11 @@ public function __construct(
ValueResolverInterface|ContainerInterface $inner,
) {
if ($inner instanceof ContainerInterface) {
trigger_deprecation('symfony/http-kernel', '7.3', sprintf('The "$container" argument of "%s::__construct()" is deprecated, pass a "%s" instance as "$inner" instead.', __CLASS__, NotTaggedCallableValueResolver::class));
$this->inner = new NotTaggedCallableValueResolver($inner);
trigger_deprecation('symfony/http-kernel', '7.3', sprintf('The "$container" argument of "%s::__construct()" is deprecated, pass a "%s" instance as "$inner" instead.', __CLASS__, NotTaggedServiceValueResolver::class));
$this->inner = new NotTaggedServiceValueResolver($inner);
return;
}
$this->inner = new NotTaggedCallableValueResolver($inner);
$this->inner = new NotTaggedServiceValueResolver($inner);
}

public function resolveArgument(ArgumentMetadata $argument, SourceValue $value): iterable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\HttpFoundation\InputBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as LegacyValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata as LegacyArgumentMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\NearMissValueResolverException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\NearMissValueResolverException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NearMissValueResolverException as LegacyNearMissValueResolverException;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as LegacyValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata as LegacyArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NearMissValueResolverException as LegacyNearMissValueResolverException;

/**
* Yields the same instance as the request object passed along.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Psr\Container\ContainerInterface;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\ServiceValueResolver as BaseServiceValueResolver;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as LegacyValueResolverInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as LegacyValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata as LegacyArgumentMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\Exception\InvalidSourceValueException;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\UidValueResolver as BaseUidValueResolver;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@

namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;

use Doctrine\Common\Collections\Expr\Value;
use Symfony\Component\ArgumentResolver\ArgumentMetadata\ArgumentMetadata;
use Symfony\Component\ArgumentResolver\SourceValue;
use Symfony\Component\ArgumentResolver\ArgumentValueSource\SourceValue;
use Symfony\Component\ArgumentResolver\ValueResolver\ValueResolverInterface;
use Symfony\Component\ArgumentResolver\ValueResolver\VariadicValueResolver as BaseVariadicValueResolver;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Loading
Loading
0