Skip to content

Fix classes generation with YAML or XML metadata. #10839

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 7 commits into from
Closed
Changes from all commits
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
17 changes: 17 additions & 0 deletions doctrine/reverse_engineering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,23 @@ files: ``BlogPost.php`` and ``BlogComment.php``.

$ php bin/console doctrine:mapping:import 'App\Entity' xml --path=config/doctrine

In this case, make sure to adapt your mapping configuration accordingly:

.. code-block:: yaml

# config/packages/doctrine.yaml
doctrine:
Copy link
Member

Choose a reason for hiding this comment

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

Can you add the # config/packages/doctrine.yaml filename comment above this line?

# ...
orm:
# ...
mappings:
App:
is_bundle: false
type: yml # Set to xml in case of XML mapping
dir: '%kernel.project_dir%/config/doctrine'
prefix: 'App\Entity'
alias: App

Generating the Getters & Setters or PHP Classes
-----------------------------------------------

Expand Down