a2lix / AutoFormBundle

Automate Symfony form building
https://a2lix.fr/bundles/auto-form
MIT License
83 stars 30 forks source link

Fixing "lint:container" failure #24

Closed liarco closed 3 years ago

liarco commented 3 years ago

Hi, I found that running bin/console lint:container in my project (Symfony 5.1) fires an error:

[ERROR] Invalid definition for service                                         
         "a2lix_auto_form.form.manipulator.doctrine_orm_manipulator": argument 1
         of "A2lix\AutoFormBundle\ObjectInfo\DoctrineORMInfo::__construct"      
         accepts "Doctrine\Persistence\Mapping\ClassMetadataFactory",           
         "Doctrine\Common\Persistence\Mapping\ClassMetadataFactory" passed.

I tried to fix it according to the error suggestion. Doctrine\Common\Persistence\* as been moved to it's own package since v2.9.0 so Doctrine\Common\Persistence\Mapping\ClassMetadataFactory is deprecated in favor of Doctrine\Persistence\Mapping\ClassMetadataFactory.

I hope this is the right fix.

Thank you for your time.

webda2l commented 3 years ago

Indeed, thanks!