Skip to content

Commit c3fd6dd

Browse files
authored
feat(doctrine): deprecate AbstractFilter base class (#8330)
1 parent 4bf850f commit c3fd6dd

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/Doctrine/Odm/Filter/AbstractFilter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
use ApiPlatform\Doctrine\Common\Filter\PropertyAwareFilterInterface;
1919
use ApiPlatform\Doctrine\Common\PropertyHelperTrait;
2020
use ApiPlatform\Doctrine\Odm\PropertyHelperTrait as MongoDbOdmPropertyHelperTrait;
21+
use ApiPlatform\Metadata\BackwardCompatibleFilterDescriptionTrait;
2122
use ApiPlatform\Metadata\Exception\RuntimeException;
23+
use ApiPlatform\Metadata\FilterInterface as MetadataFilterInterface;
2224
use ApiPlatform\Metadata\Operation;
2325
use Doctrine\ODM\MongoDB\Aggregation\Builder;
2426
use Doctrine\Persistence\ManagerRegistry;
@@ -32,6 +34,8 @@
3234
* Abstract class for easing the implementation of a filter.
3335
*
3436
* @author Alan Poulain <contact@alanpoulain.eu>
37+
*
38+
* @deprecated since API Platform 4.4, implement {@see MetadataFilterInterface} directly together with {@see BackwardCompatibleFilterDescriptionTrait} and the canonical QueryParameter-based filters (ExactFilter, PartialSearchFilter, EndSearchFilter, ComparisonFilter, OrFilter, …) instead; this class is removed in 6.0
3539
*/
3640
abstract class AbstractFilter implements FilterInterface, PropertyAwareFilterInterface, ManagerRegistryAwareInterface, NameConverterAwareInterface
3741
{

src/Doctrine/Orm/Filter/AbstractFilter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@
1919
use ApiPlatform\Doctrine\Common\PropertyHelperTrait;
2020
use ApiPlatform\Doctrine\Orm\PropertyHelperTrait as OrmPropertyHelperTrait;
2121
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
22+
use ApiPlatform\Metadata\BackwardCompatibleFilterDescriptionTrait;
2223
use ApiPlatform\Metadata\Exception\RuntimeException;
24+
use ApiPlatform\Metadata\FilterInterface as MetadataFilterInterface;
2325
use ApiPlatform\Metadata\Operation;
2426
use Doctrine\ORM\QueryBuilder;
2527
use Doctrine\Persistence\ManagerRegistry;
2628
use Psr\Log\LoggerInterface;
2729
use Psr\Log\NullLogger;
2830
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
2931

32+
/**
33+
* @deprecated since API Platform 4.4, implement {@see MetadataFilterInterface} directly together with {@see BackwardCompatibleFilterDescriptionTrait} and the canonical QueryParameter-based filters (ExactFilter, PartialSearchFilter, EndSearchFilter, ComparisonFilter, OrFilter, …) instead; this class is removed in 6.0
34+
*/
3035
abstract class AbstractFilter implements FilterInterface, PropertyAwareFilterInterface, ManagerRegistryAwareInterface, NameConverterAwareInterface
3136
{
3237
use OrmPropertyHelperTrait;

0 commit comments

Comments
 (0)