Skip to content

Commit 838dde2

Browse files
committed
minor #10839 Fix classes generation with YAML or XML metadata. (baiolo)
This PR was squashed before being merged into the 4.1 branch (closes #10839). Discussion ---------- Fix classes generation with YAML or XML metadata. The documentation misses the change of one configuration file if the generated metadata is in YAML or XML format. This PR documents how to change the configuration file. Commits ------- eb5cad3 Fix classes generation with YAML or XML metadata.
2 parents 0c800ac + eb5cad3 commit 838dde2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doctrine/reverse_engineering.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,23 @@ files: ``BlogPost.php`` and ``BlogComment.php``.
7070
7171
$ php bin/console doctrine:mapping:import 'App\Entity' xml --path=config/doctrine
7272
73+
In this case, make sure to adapt your mapping configuration accordingly:
74+
75+
.. code-block:: yaml
76+
77+
# config/packages/doctrine.yaml
78+
doctrine:
79+
# ...
80+
orm:
81+
# ...
82+
mappings:
83+
App:
84+
is_bundle: false
85+
type: yml # Set to xml in case of XML mapping
86+
dir: '%kernel.project_dir%/config/doctrine'
87+
prefix: 'App\Entity'
88+
alias: App
89+
7390
Generating the Getters & Setters or PHP Classes
7491
-----------------------------------------------
7592

0 commit comments

Comments
 (0)