Skip to content

Commit aecd1cf

Browse files
committed
minor #16711 [Config] Add yaml anchors example to share config between environments (Florian-B)
This PR was merged into the 5.4 branch. Discussion ---------- [Config] Add yaml anchors example to share config between environments This example can be useful to prevent duplicates configuration between multiple environments. See symfony/symfony#45506 Commits ------- 2d13ead Update configuration.rst
2 parents ba02a07 + 2d13ead commit aecd1cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

configuration.rst

+6
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,12 @@ files directly in the ``config/packages/`` directory.
465465
when@test:
466466
webpack_encore:
467467
strict_mode: false
468+
469+
# you can use "Yaml anchors" to share config between multiple environments (make "test" config identical to "prod")
470+
when@prod: &webpack_prod
471+
webpack_encore:
472+
# ...
473+
when@test: *webpack_prod
468474
469475
.. code-block:: xml
470476

0 commit comments

Comments
 (0)