Skip to content

Commit f728b6f

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Clarify not using the Config component for app configuration Clarify the purpose of the Config component
2 parents 7af2c35 + 9c67dc8 commit f728b6f

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

best_practices.rst

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ Define these options as :ref:`parameters <configuration-parameters>` in the
109109
:ref:`environment <configuration-environments>` in the ``config/services_dev.yaml``
110110
and ``config/services_prod.yaml`` files.
111111

112+
Unless the application configuration is reused multiple times and needs
113+
rigid validation, do *not* use the :doc:`Config component </components/config>`
114+
to define the options.
115+
112116
Use Short and Prefixed Parameter Names
113117
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114118

components/config.rst

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
The Config Component
22
====================
33

4-
The Config component provides several classes to help you find, load,
5-
combine, fill and validate configuration values of any kind, whatever
6-
their source may be (YAML, XML, INI files, or for instance a database).
4+
The Config component provides utilities to define and manage the configuration
5+
options of PHP applications. It allows you to:
6+
7+
* Define a configuration structure, its validation rules, default values and documentation;
8+
* Support different configuration formats (YAML, XML, INI, etc.);
9+
* Merge multiple configurations from different sources into a single configuration.
10+
11+
.. note::
12+
13+
You don't have to use this component to configure Symfony applications.
14+
Instead, read the docs about :doc:`how to configure Symfony applications </configuration>`.
715

816
Installation
917
------------

0 commit comments

Comments
 (0)