mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
ConvertMappingCommand does not work from attributes to xml #6960
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bartholdbos on GitHub (Apr 13, 2022).
Bug Report
Summary
Exporting attribute mappings to xml mappings does not work
Current behavior
When exporting attribute based mappings to xml mappings with the ConvertMappingCommand the following error occurs:
The problem is that the AttributeDriver does not have a ReflectionClass available. This seems to be caused by the ConvertMappingCommand which instantiates a DisconnectedClassMetadataFactory. This metadataFactory only has a StaticReflectionService which does not create ReflectionClasses.
How to reproduce
https://github.com/bartholdbos/attribute_bug
run
bin/console doctrine:mapping:convert xml mappingsExpected behavior
XML mappings files being generated into the given directory