Skip to content

Commit

Permalink
Merge f082e81 into c7f25dc
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jun 17, 2024
2 parents c7f25dc + f082e81 commit 7c2f90e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Metadata/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace ApiPlatform\Metadata;

use ApiPlatform\OpenApi;
use ApiPlatform\State\ProviderInterface;
use ApiPlatform\State\ParameterProviderInterface;
use Symfony\Component\Validator\Constraint;

/**
Expand All @@ -23,11 +23,11 @@
abstract class Parameter
{
/**
* @param array{type?: string}|null $schema
* @param array<string, mixed> $extraProperties
* @param ProviderInterface|callable|string|null $provider
* @param FilterInterface|string|null $filter
* @param Constraint|Constraint[]|null $constraints
* @param array{type?: string}|null $schema
* @param array<string, mixed> $extraProperties
* @param ParameterProviderInterface|callable|string|null $provider
* @param FilterInterface|string|null $filter
* @param Constraint|Constraint[]|null $constraints
*/
public function __construct(
protected ?string $key = null,
Expand Down Expand Up @@ -144,7 +144,7 @@ public function withOpenApi(OpenApi\Model\Parameter $openApi): static
}

/**
* @param ProviderInterface|string $provider
* @param ParameterProviderInterface|string $provider
*/
public function withProvider(mixed $provider): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use ApiPlatform\Metadata\Util\Inflector;
use ApiPlatform\Problem\Serializer\ConstraintViolationListNormalizer;
use ApiPlatform\State\ApiResource\Error;
use ApiPlatform\State\ParameterProviderInterface;
use ApiPlatform\State\ProcessorInterface;
use ApiPlatform\State\ProviderInterface;
use ApiPlatform\Symfony\EventListener\AddHeadersListener;
Expand Down Expand Up @@ -202,6 +203,8 @@ public function load(array $configs, ContainerBuilder $container): void
->addTag('api_platform.state_processor');
$container->registerForAutoconfiguration(UriVariableTransformerInterface::class)
->addTag('api_platform.uri_variables.transformer');
$container->registerForAutoconfiguration(ParameterProviderInterface::class)
->addTag('api_platform.parameter_provider');

if (!$container->has('api_platform.state.item_provider')) {
$container->setAlias('api_platform.state.item_provider', 'api_platform.state_provider.object');
Expand Down

0 comments on commit 7c2f90e

Please sign in to comment.