Deprecate PromotionCouponPromotionFilter

This commit is contained in:
Kamil Grygierzec 2024-07-29 15:20:25 +02:00
parent 0c11dbea31
commit f8ce9f8a17
No known key found for this signature in database
GPG key ID: 7F54EE42DAD4B9E9
2 changed files with 11 additions and 1 deletions

View file

@ -17,7 +17,9 @@
1. The class `Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfo` has been deprecated and will be removed in Sylius 2.0.
1. The class `\Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriber` has been deprecated and will be removed in Sylius 2.0.
1. The class `Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriber` has been deprecated and will be removed in Sylius 2.0.
1. The class `Sylius\Bundle\ApiBundle\Filter\Doctrine\PromotionCouponPromotionFilter` has been deprecated and will be removed in Sylius 2.0.
1. Extending `\InvalidArgumentException` by `Sylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHandException`
and `Sylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHoldException` is deprecated, instead they will extend

View file

@ -23,6 +23,14 @@ use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
trigger_deprecation(
'sylius/api-bundle',
'1.14',
'The "%s" class is deprecated and will be removed in Sylius 2.0. Starting with this version, promotion coupon collection will be filtered by promotion code, using API Platform search filter.',
PromotionCouponPromotionFilter::class
);
/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
final class PromotionCouponPromotionFilter extends AbstractContextAwareFilter
{
public const PROPERTY = 'promotion';