diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index 4265fae224c..939991adb7e 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -25,6 +25,13 @@ and set a parameter in the container with:: $container->setParameter('mailer.transport', 'sendmail'); +.. caution:: + + The used ``.`` notation is just a + :ref:`Symfony convention ` to make parameters + easier to read. Parameters are just flat key-value elements, they can't be + organized into a nested array + .. note:: You can only set a parameter before the container is compiled. To learn @@ -190,9 +197,9 @@ making the class of a service a parameter: Array Parameters ---------------- -Parameters do not need to be flat strings, they can also be arrays. For the XML -format, you need to use the ``type="collection"`` attribute for all parameters that are -arrays. +Parameters do not need to be flat strings, they can also contain array values. +For the XML format, you need to use the ``type="collection"`` attribute for +all parameters that are arrays. .. configuration-block:: diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 1d512b3855e..aadcb34ef90 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -133,6 +133,8 @@ Naming Conventions * Don't forget to look at the more verbose :doc:`conventions` document for more subjective naming considerations. +.. _service-naming-conventions: + Service Naming Conventions ~~~~~~~~~~~~~~~~~~~~~~~~~~