[API] Add missing services and classes deprecations

This commit is contained in:
Rafikooo 2024-11-11 03:33:19 +01:00
parent 5a24b51ebf
commit f0035e3858
No known key found for this signature in database
GPG key ID: 4A26D8327BC2442B
4 changed files with 21 additions and 1 deletions

View file

@ -37,6 +37,12 @@ final class CommandDataTransformerPass implements CompilerPassInterface
$commandDataTransformersChainDefinition->addTag('api_platform.data_transformer');
$commandDataTransformersChainDefinition->setDeprecated(
'sylius/api-bundle',
'1.14',
'The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.',
);
$container->setDefinition(
'sylius.api.data_transformer.command_aware_input_data_transformer',
$commandDataTransformersChainDefinition,

View file

@ -15,6 +15,14 @@ namespace Sylius\Bundle\ApiBundle\PropertyInfo\Extractor;
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
trigger_deprecation(
'sylius/api-bundle',
'1.14',
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
EmptyPropertyListExtractor::class,
);
/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
final class EmptyPropertyListExtractor implements PropertyListExtractorInterface
{
public function getProperties($class, array $context = []): ?array

View file

@ -32,8 +32,11 @@
<service id="Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor">
<tag name="property_info.list_extractor" priority="-2000" />
<deprecated package="sylius/api-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
</service>
<service id="sylius_api.extractor.property_info.empty_property_list" alias="Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor">
<deprecated package="sylius/api-bundle" version="1.14">The "%alias_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
</service>
<service id="sylius_api.extractor.property_info.empty_property_list" alias="Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor" />
<service id="Sylius\Bundle\ApiBundle\DataTransformer\OrderTokenValueAwareInputCommandDataTransformer">
<tag name="sylius.api.command_data_transformer" priority="1000" />

View file

@ -60,6 +60,7 @@
<service id="Sylius\Bundle\ApiBundle\Filter\ShippingMethodFilter" public="true">
<tag name="api_platform.filter" />
<deprecated package="sylius/api-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
</service>
<service id="sylius.api.product_image_product_variants_filter" parent="api_platform.doctrine.orm.search_filter" public="true">
@ -219,6 +220,7 @@
<service id="Sylius\Bundle\ApiBundle\Filter\PaymentMethodFilter" public="true">
<tag name="api_platform.filter" />
<deprecated package="sylius/api-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
</service>
<service id="sylius.api.catalog_promotion_search_filter" parent="api_platform.doctrine.orm.search_filter" public="true">
@ -343,6 +345,7 @@
<argument type="service" id="api_platform.symfony.iri_converter" />
<argument type="service" id="doctrine" />
<tag name="api_platform.filter" />
<deprecated package="sylius/api-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
</service>
<service id="sylius.api.search_filter.product.code" parent="api_platform.doctrine.orm.search_filter" public="true">