-
The product images should have a proper prefix (
/media/image/
) added to the path, so the images could be resolved. This is now done out of the box and response ofProduct Image
resource is now:{ "@context": "/api/v2/contexts/ProductImage", "@id": "/api/v2/shop/product-images/123", "@type": "ProductImage", "id": "123", "type": "thumbnail", - "path": "uo/product.jpg", + "path": "/media/image/uo/product.jpg" }
To change the prefix you need to set parameter in
app/config/packages/_sylius.yaml
:sylius_api: product_image_prefix: 'media/image'
-
Sylius\Bundle\ApiBundle\Doctrine\Filters\ExchangeRateFilter
andSylius\Bundle\ApiBundle\Doctrine\Filters\TranslationOrderNameAndLocaleFilter
has been moved toSylius\Bundle\ApiBundle\Doctrine\Filter\ExchangeRateFilter
andSylius\Bundle\ApiBundle\Doctrine\Filter\TranslationOrderNameAndLocaleFilter
respectively. -
Sylius\Bundle\ApiBundle\View\CartShippingMethodInterface
andSylius\Bundle\ApiBundle\View\CartShippingMethod
have been removed. -
Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactoryInterface
andSylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactory
have been removed. -
The constructor of
Sylius\Bundle\ApiBundle\DataProvider\CartShippingMethodsSubresourceDataProvider
has been changed:public function __construct( OrderRepositoryInterface $orderRepository, ShipmentRepositoryInterface $shipmentRepository, ShippingMethodsResolverInterface $shippingMethodsResolver, - ServiceRegistryInterface $calculators, - CartShippingMethodFactoryInterface $cartShippingMethodFactory ) { ... }
-
The response schema for endpoint
GET /api/v2/shop/orders/{tokenValue}/shipments/{shipments}/methods
has been changed from:... "hydra:member": [ { ... "@type": "CartShippingMethod", "shippingMethod": { ... "price": 500 } } ]
to:
... "hydra:member": [ { ... "@type": "ShippingMethod", ... "price": 500 } ]
-
Constructor of
Core/OrderProcessing/OrderTaxesProcessor.php
has been changed where new service implementingTaxationAddressResolverInterface
will become mandatory from Sylius version 2.0:public function __construct( ZoneProviderInterface $defaultTaxZoneProvider, ZoneMatcherInterface $zoneMatcher, PrioritizedServiceRegistryInterface $strategyRegistry, + ?TaxationAddressResolverInterface $taxationAddressResolver = null ) { ... }
-
Constructor of
ApiBundle/Serializer/ProductVariantNormalizer.php
has been extended withSectionProviderInterface
argument:public function __construct( ProductVariantPricesCalculatorInterface $priceCalculator, ChannelContextInterface $channelContext, AvailabilityCheckerInterface $availabilityChecker, + SectionProviderInterface $uriBasedSectionContext ) { ... }
-
Request body of
POST
api/v2/shop/addresses
endpoint has been changed:{ - "customer": "string", "firstName": "string", "lastName": "string", "phoneNumber": "string", "company": "string", "countryCode": "string", "provinceCode": "string", "provinceName": "string", "street": "string", "city": "string", "postcode": "string" }
-
The service
Sylius\Bundle\ApiBundle\Converter\ItemIriToIdentifierConverter
has changed its name toSylius\Bundle\ApiBundle\Converter\IriToIdentifierConverter
and its service definition fromSylius\Bundle\ApiBundle\Converter\ItemIriToIdentifierConverter
toSylius\Bundle\ApiBundle\Converter\IriToIdentifierConverterInterface
-
The service
Sylius\Bundle\ApiBundle\Serializer\CommandFieldItemIriToIdentifierDenormalizer
has changed its name toSylius\Bundle\ApiBundle\Serializer\CommandArgumentsDenormalizer
and also its service definition.