Sylius / PluginSkeleton

Skeleton for starting Sylius plugins.
https://sylius.com/plugins/
73 stars 63 forks source link

Doctrine schema validation fails when Gedmo timestampable is used with "doctrine/orm": "2.14.2" #390

Closed plewandowski closed 1 year ago

plewandowski commented 1 year ago

Can be reproduced with PluginSkeleton v1.12.2 It seems that schema validation fails for any project where dependencies were doctrine/orm we bumped up to 2.14.2.

 libxml error: Element '{http://gediminasm.org/schemas/orm/doctrine-extensions-mapping}sortable-position': No matching global element declaration available, but demanded by the strict wildcard.  
   in src/Resources/config/doctrine/TaxonGalleryItem.orm.xml at line 20    

It seems to work ok with 2.14.1.

Workaround? Potential solution can be avoiding 2.14.2 (if this is doctrine bug) or finding root cause. I did not investigated it deeper yet. I solved it so far with:

"conflict": {
        "doctrine/orm": "2.14.2"
    },

Simple steps to reproduce: For project using Sylius/PluginSkeleton v1.12.2 and define doctrine entities in xml and use gedmo:timestampable tag within a field tag run:

rm -fr composer.lock && composer install --no-scripts --no-plugins --no-cache
(cd tests/Application && bin/console doctrine:schema:validate) # same effect with schema create or update
plewandowski commented 1 year ago

it seems that problem is solved already: https://github.com/doctrine/DoctrineBundle/issues/1643