monsieurbiz / SyliusSearchPlugin

A search plugin using Elasticsearch for Sylius
MIT License
45 stars 38 forks source link

Add attribute notation to SearchableTrait #198

Closed jurv closed 9 months ago

jurv commented 10 months ago

The SearchableTrait only has annotations for Doctrine, which is an issue for projects where Doctrine is configured to use PHP attributes:

doctrine:
    orm:
        entity_managers:
            default:
                mappings:
                    App:
                        type: attribute
                        [...]

When following the installation instructions with this configuration, the console doctrine:migrations:diff step doesn't generate any migration, as no changes are detected.

The configuration provided in the annotations should also be provided as PHP attributes.