Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update service_container.rst#19574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.1fromn-valverde:patch-1
Aug 9, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletionsservice_container.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1035,20 +1035,25 @@ to them.
Linting Service Definitions
---------------------------

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

.. code-block:: terminal

$ php bin/console lint:container

Checking the types of all service arguments whenever the container is compiled
can hurt performance. That's why this type checking is implemented in a
:doc:`compiler pass </service_container/compiler_passes>` called
``CheckTypeDeclarationsPass`` which is disabled by default and enabled only when
executing the ``lint:container`` command. If you don't mind the performance
loss, enable the compiler pass in your application.
Doing those checks whenever the container is compiled
can hurt performance. That's why this is implemented in
:doc:`compiler passes </service_container/compiler_passes>` called
``CheckTypeDeclarationsPass`` and ``CheckAliasValidityPass`` which are disabled
by default and enabled only when executing the ``lint:container`` command.
If you don't mind the performance loss, enable these compiler passes in
your application.

.. _container-public:

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp