Skip to content

Changing versionadded 5.1 to note #17520

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

Merged
merged 1 commit into from
Jun 6, 2023
Merged
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
12 changes: 5 additions & 7 deletions configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,11 @@ configure your applications. Symfony lets you choose between YAML, XML and PHP
and throughout the Symfony documentation, all configuration examples will be
shown in these three formats.

.. versionadded:: 5.1
.. note::

Starting from Symfony 5.1, by default Symfony only loads the configuration
By default, Symfony only loads the configuration
files defined in YAML format. If you define configuration in XML and/or PHP
formats, update the ``src/Kernel.php`` file to add support for the ``.xml``
and ``.php`` file extensions by overriding the
:method:`Symfony\\Component\\HttpKernel\\Kernel::configureContainer` method::
formats, update the ``src/Kernel.php`` file::

// src/Kernel.php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
Expand All @@ -93,8 +91,8 @@ shown in these three formats.
}

There isn't any practical difference between formats. In fact, Symfony
transforms and caches all of them into PHP before running the application, so
there's not even any performance difference between them.
transforms all of them into PHP and caches them before running the application, so
there's not even any performance difference.

YAML is used by default when installing packages because it's concise and very
readable. These are the main advantages and disadvantages of each format:
Expand Down