We remove the default mapping paths which are used to read PHP 8 attributes to build routes.
To configure this default value, please edit your config/packages/sylius_resource.yaml file to add your mapping paths manually:
# config/packages/sylius_resource.yaml
sylius_resource:
mapping:
paths:
- '%kernel.project_dir%/src/Entity'These following services are now Doctrine listeners instead of Doctrine subscribers (@see symfony/symfony#49586)
- Sylius\Bundle\ResourceBundle\EventListener\ORMTranslatableListener
- Sylius\Bundle\ResourceBundle\EventListener\ORMRepositoryClassSubscriber
- Sylius\Bundle\ResourceBundle\EventListener\ORMMappedSuperClassSubscriber
Applied the UniqueEntity constraint for locale and translatable fields, and added NotBlank & Locale constraints for the locale property in classes extending Sylius\Resource\Model\AbstractTranslation.
Applied the Valid constraint for the getTranslations method for objects implementing Sylius\Resource\Model\TranslatableInterface.
-
failed form response status code returned from the
ResourceController::createActionandResourceController::updateActionchanged from200to422see: Sylius#488. This is technically a bug fix, but could break the application if your logic is based on this bugged previous status code
-
jms/serializerandjms/serializer-bundlefrom2.xto3.x:follow their upgrade process for the component and the bundle; if you're getting errors about serializing the entity manager, consider changing the serialized type from
arraytoiterablefor Doctrine collections in your models -
friendsofsymfony/rest-bundlefrom2.xto3.x:follow their upgrade process; if you're using this bundle to render HTML templates as well, replace it with direct calls to Twig and handle only the REST logic via this bundle (see this PR for more)
-
willdurand/hateoasfrom2.xto3.x:follow their upgrade process
-
from
white-october/pagerfanta-bundle^1.0tobabdev/pagerfanta-bundle^2.5:follow their upgrade process
-
doctrine/persistencefrom1.xto2.x(if applicable):replace
Doctrine\Common\PersistencewithDoctrine\Persistencein your codebase
You can find an exemplary upgrade to this version of ResourceBundle on Sylius repository in this PR.
If you're using an "Accept" HTTP header to set the serialization groups, you need to define allowed groups
either by passing them as default in serialization_groups setting or marking them as allowed in
allowed_serialization_groups setting, both settings are set in the route definition (under _sylius key).