简体   繁体   中英

Can you configure Symfony to use XML instead of YAML and annotations?

I want to implement an API using Symfony/API-Platform and I would like to use XML instead of YAML and annotations. For example when I run bin/console make:user to create a user entity, it will be created with doctrine annotations for mapping properties to database fields. What i want is the same functionality but in a XML file.

Is there a possibility to configure symfony to prefer XML configuration?

Maybe there is a better way to do it, but changing type in mapping configuration to xml may help you. Default file is located here and you need to change type to xml and dir to xml mapping path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM