File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Original file line number Diff line number Diff line change @@ -788,6 +788,28 @@ you don't need to do *anything*: the service will be automatically loaded. Then,
788
788
implements ``Twig\Extension\ExtensionInterface ``. And thanks to ``autowire ``, you can even add
789
789
constructor arguments without any configuration.
790
790
791
+ Linting Service Definitions
792
+ ---------------------------
793
+
794
+ .. versionadded :: 4.4
795
+
796
+ The ``lint:conainer `` command was introduced in Symfony 4.4.
797
+
798
+ The ``lint:conainer `` command checks that the arguments injected into services
799
+ match their type declarations. It's useful to run it before deploying your
800
+ application to production (e.g. in your continuous integration server):
801
+
802
+ .. code-block :: terminal
803
+
804
+ $ php bin/console lint:container
805
+
806
+ Checking the types of all service arguments whenever the container is compiled
807
+ can hurt performance. That's why this type checking is implemented in a
808
+ :doc: `compiler pass </service_container/compiler_passes >` called
809
+ ``CheckTypeDeclarationsPass `` which is disabled by default and enabled only when
810
+ executing the ``lint:container `` command. If you don't mind the performance
811
+ loss, enable the compiler pass in your application.
812
+
791
813
.. _container-public :
792
814
793
815
Public Versus Private Services
You can’t perform that action at this time.
0 commit comments