Skip to content

Commit

Permalink
chore: deprecate ApiPlatform\Api\FilterInterface (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
louismariegaborit committed Apr 15, 2024
1 parent 1a120ee commit 9fee836
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/guides/create-a-custom-doctrine-filter.php
Expand Up @@ -7,7 +7,7 @@
// tags: doctrine, expert
// ---

// Custom filters can be written by implementing the `ApiPlatform\Api\FilterInterface` interface.
// Custom filters can be written by implementing the `ApiPlatform\Metadata\FilterInterface` interface.
//
// API Platform provides a convenient way to create Doctrine ORM and MongoDB ODM filters. If you use [custom state providers](/docs/guide/state-providers), you can still create filters by implementing the previously mentioned interface, but - as API Platform isn't aware of your persistence system's internals - you have to create the filtering logic by yourself.
//
Expand Down
2 changes: 2 additions & 0 deletions src/Api/FilterInterface.php
Expand Up @@ -17,6 +17,8 @@
* Filters applicable on a resource.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*
* @deprecated
*/
interface FilterInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/ParameterValidator/Validator/ValidatorInterface.php
Expand Up @@ -17,7 +17,7 @@ interface ValidatorInterface
{
/**
* @param string $name the parameter name to validate
* @param array<string, mixed> $filterDescription the filter descriptions as returned by `\ApiPlatform\Api\FilterInterface::getDescription()`
* @param array<string, mixed> $filterDescription the filter descriptions as returned by `\ApiPlatform\Metadata\FilterInterface::getDescription()`
* @param array<string, mixed> $queryParameters the list of query parameter
*/
public function validate(string $name, array $filterDescription, array $queryParameters): array;
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/DummyFilter.php
Expand Up @@ -13,7 +13,7 @@

namespace ApiPlatform\Tests\Fixtures;

use ApiPlatform\Api\FilterInterface;
use ApiPlatform\Metadata\FilterInterface;

/**
* @author Kévin Dunglas <dunglas@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Filter/NoConstructorFilter.php
Expand Up @@ -13,7 +13,7 @@

namespace ApiPlatform\Tests\Fixtures\TestBundle\Filter;

use ApiPlatform\Api\FilterInterface;
use ApiPlatform\Metadata\FilterInterface;

final class NoConstructorFilter implements FilterInterface
{
Expand Down
Expand Up @@ -13,7 +13,7 @@

namespace ApiPlatform\Tests\Fixtures\TestBundle\Filter;

use ApiPlatform\Api\FilterInterface;
use ApiPlatform\Metadata\FilterInterface;

final class NoPropertiesArgumentFilter implements FilterInterface
{
Expand Down

0 comments on commit 9fee836

Please sign in to comment.