Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a232a4

Browse files
fix: add legacy FilterInterface as return type of getFilter function (#6311)
1 parent 9fee836 commit 8a232a4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/ParameterValidator/FilterLocatorTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313

1414
namespace ApiPlatform\ParameterValidator;
1515

16+
use ApiPlatform\Api\FilterInterface;
1617
use ApiPlatform\Exception\InvalidArgumentException;
17-
use ApiPlatform\Metadata\FilterInterface;
18+
use ApiPlatform\Metadata\FilterInterface as MetadataFilterInterface;
1819
use Psr\Container\ContainerInterface;
1920

2021
/**
@@ -45,7 +46,7 @@ private function setFilterLocator(?ContainerInterface $filterLocator, bool $allo
4546
/**
4647
* Gets a filter with a backward compatibility.
4748
*/
48-
private function getFilter(string $filterId): ?FilterInterface
49+
private function getFilter(string $filterId): FilterInterface|MetadataFilterInterface|null
4950
{
5051
if ($this->filterLocator && $this->filterLocator->has($filterId)) {
5152
return $this->filterLocator->get($filterId);

0 commit comments

Comments
 (0)