Skip to content

To use annotations, files must be removed #6251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cookbook/doctrine/reverse_engineering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ execute the second command only.

.. tip::

If you want to use annotations, you can safely delete the XML (or YAML) files
after running these two commands.
If you want to use annotations, you must remove the XML (or YAML) files
after running these two commands. It is `not possible to mix XML/YAML metadata
definitions with annotated PHP entity class definitions
<http://symfony.com/doc/current/book/doctrine.html#add-mapping-information>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition is nice, but we should use the ref role to link to that section like this (I would also reword this a bit):

If you want to use annotations, you must remove the XML (or YAML) files
after running these two commands. This is necessary as
:ref:`it is not possible to mix mapping configuration formats <book-doctrine-adding-mapping>`.


For example, the newly created ``BlogComment`` entity class looks as follow::

Expand Down