Skip to content

Commit 477ce4f

Browse files
authored
Fix custom filter example (#1560)
1 parent 41efb7f commit 477ce4f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/filters.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,14 +1174,15 @@ library. This library must be properly installed and registered to use this exam
11741174
11751175
namespace App\Filter;
11761176
1177-
use ApiPlatform\Doctrine\Orm\Filter\AbstractContextAwareFilter;
1177+
use ApiPlatform\Doctrine\Orm\Filter\AbstractFilter;
11781178
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
1179+
use ApiPlatform\Metadata\Operation;
11791180
use Doctrine\ORM\QueryBuilder;
11801181
use Symfony\Component\PropertyInfo\Type;
11811182
1182-
final class RegexpFilter extends AbstractContextAwareFilter
1183+
final class RegexpFilter extends AbstractFilter
11831184
{
1184-
protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null)
1185+
protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, Operation $operation = null, array $context = [])
11851186
{
11861187
// otherwise filter is applied to order and page as well
11871188
if (

0 commit comments

Comments
 (0)