Skip to content

Instantly share code, notes, and snippets.

@AkdM
Created October 24, 2014 14:09
Show Gist options
  • Save AkdM/49ae1d4115246a057526 to your computer and use it in GitHub Desktop.
Save AkdM/49ae1d4115246a057526 to your computer and use it in GitHub Desktop.
Convert annotation to YAML for Symfony 2
php app/console doctrine:mapping:convert --namespace="MySuper\DuperBundle\Entity\MyEntity" yaml src/MySuper/DuperBundle/Resources/config/doctrine
That command will convert the annotation file into yaml format into src/MySuper/DuperBundle/Resources/config/doctrine as MySuper.DuperBundle.Entity.MyEntity.orm.yml
@vibby
Copy link

vibby commented Oct 16, 2020

On symfony 5, command should be something like

docker-compose exec ac-php-cli bin/console doctrine:mapping:import "App\Entity" yaml --path=config/doctrine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment