Skip to content

Commit

Permalink
Merge 17b0266 into c7f25dc
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jun 14, 2024
2 parents c7f25dc + 17b0266 commit 4dcfd68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 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
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 4dcfd68

Please sign in to comment.