Closed shochdoerfer closed 3 months ago
Looks like this happens since in config/packages/doctrine.yaml
the default mapping type is set to annotation
in Sylius 1.12.16:
doctrine:
orm:
entity_managers:
default:
mappings:
App:
type: annotation
When I change the type to attribute
(which is the default setting for Sylius 1.13.1) I get the following errors then running the bin/console doctrine:schema:validate
command:
Should we add a hint to the README.md file for Sylius 1.12 users to switch the Doctrine default mapping type to attribute
? Or should we also add Doctrine annotations to all files?
I don't think we need to explicitly state that in our README as this is the "normal" Sylius upgrade path seeing that we are already prepared for attributes.
I've tried installing v4 with a fresh install of Sylius 1.12.16 as well as 1.13.1. In both cases, the Doctrine panel in the Symfony Web profiler reports:
The mappings Brille24\SyliusCustomerOptionsPlugin\Entity\CustomerOptions\Validator\Validator#constraints and Brille24\SyliusCustomerOptionsPlugin\Entity\CustomerOptions\Validator\Constraint#validator are inconsistent with each other.
I've added the code outlined in the README file to my Product and OrderItem entity. Also, I tried to copy the properties from the traits to my entity classes, that didn't help either. Somehow Doctrine does not seem to be able to pick up the additional properties introduced by the traits.
That leads to an error when opening the customer option groups page in Sylius Admin and I am not able to save the customer options for a specific product.