Skip to content

Commit

Permalink
Merge branch '5.4' into 6.4
Browse files Browse the repository at this point in the history
* 5.4:
  Clarify not using the Config component for app configuration
  Clarify the purpose of the Config component
  • Loading branch information
javiereguiluz committed Jul 17, 2024
2 parents c0a83fb + 8b4b586 commit 9c67dc8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ Define these options as :ref:`parameters <configuration-parameters>` in the
:ref:`environment <configuration-environments>` in the ``config/services_dev.yaml``
and ``config/services_prod.yaml`` files.

Unless the application configuration is reused multiple times and needs
rigid validation, do *not* use the :doc:`Config component </components/config>`
to define the options.

Use Short and Prefixed Parameter Names
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
14 changes: 11 additions & 3 deletions components/config.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
The Config Component
====================

The Config component provides several classes to help you find, load,
combine, fill and validate configuration values of any kind, whatever
their source may be (YAML, XML, INI files, or for instance a database).
The Config component provides utilities to define and manage the configuration
options of PHP applications. It allows you to:

* Define a configuration structure, its validation rules, default values and documentation;
* Support different configuration formats (YAML, XML, INI, etc.);
* Merge multiple configurations from different sources into a single configuration.

.. note::

You don't have to use this component to configure Symfony applications.
Instead, read the docs about :doc:`how to configure Symfony applications </configuration>`.

Installation
------------
Expand Down

0 comments on commit 9c67dc8

Please sign in to comment.