Skip to content

Commit 9d56329

Browse files
committed
minor #19574 Update service_container.rst (n-valverde)
This PR was squashed before being merged into the 7.1 branch. Discussion ---------- Update service_container.rst Update `lint:container` doc. Fix #19522 Commits ------- ed51242 Update service_container.rst
2 parents 8246839 + ed51242 commit 9d56329

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

service_container.rst

+14-9
Original file line numberDiff line numberDiff line change
@@ -1035,20 +1035,25 @@ to them.
10351035
Linting Service Definitions
10361036
---------------------------
10371037

1038-
The ``lint:container`` command checks that the arguments injected into services
1039-
match their type declarations. It's useful to run it before deploying your
1040-
application to production (e.g. in your continuous integration server):
1038+
The ``lint:container`` command performs some additional checks to make sure
1039+
the container is properly configured:
1040+
* ensures the arguments injected into services match their type declarations.
1041+
* ensures the interfaces configured as alias are resolving to a compatible
1042+
service.
1043+
It's useful to run it before deploying your application to production
1044+
(e.g. in your continuous integration server):
10411045

10421046
.. code-block:: terminal
10431047
10441048
$ php bin/console lint:container
10451049
1046-
Checking the types of all service arguments whenever the container is compiled
1047-
can hurt performance. That's why this type checking is implemented in a
1048-
:doc:`compiler pass </service_container/compiler_passes>` called
1049-
``CheckTypeDeclarationsPass`` which is disabled by default and enabled only when
1050-
executing the ``lint:container`` command. If you don't mind the performance
1051-
loss, enable the compiler pass in your application.
1050+
Doing those checks whenever the container is compiled
1051+
can hurt performance. That's why this is implemented in
1052+
:doc:`compiler passes </service_container/compiler_passes>` called
1053+
``CheckTypeDeclarationsPass`` and ``CheckAliasValidityPass`` which are disabled
1054+
by default and enabled only when executing the ``lint:container`` command.
1055+
If you don't mind the performance loss, enable these compiler passes in
1056+
your application.
10521057

10531058
.. _container-public:
10541059

0 commit comments

Comments
 (0)