Brille24 / SyliusCustomOptionsPlugin

A Sylius plugin that adds customer options
MIT License
47 stars 34 forks source link

Installing v4 of the plugin misses required associations #156

Closed shochdoerfer closed 3 months ago

shochdoerfer commented 3 months ago

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:

shochdoerfer commented 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:

shochdoerfer commented 3 months ago

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?

mamazu commented 3 months ago

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.