@@ -20,6 +20,7 @@ Tag Name Usage
2020`assetic.templating.twig `_ Remove this service if Twig templating is disabled
2121`auto_alias `_ Define aliases based on the value of container parameters
2222`console.command `_ Add a command
23+ `container.hot_path `_ Add to list of always needed services
2324`controller.argument_value_resolver `_ Register a value resolver for controller arguments such as ``Request ``
2425`data_collector `_ Create a class that collects custom data for the profiler
2526`doctrine.event_listener `_ Add a Doctrine event listener
@@ -362,6 +363,27 @@ console.command
362363For details on registering your own commands in the service container, read
363364:doc: `/console/commands_as_services `.
364365
366+ container.hot_path
367+ ------------------
368+
369+ .. versionadded :: 3.4
370+
371+ The ``container.hot_path `` tag was introduced in Symfony 3.4.
372+
373+ **Purpose **: Add to list of always needed services
374+
375+ This tag identifies the services that are always needed. It is only applied to
376+ a very short list of bootstrapping services (like ``router ``, ``event_dispatcher ``,
377+ ``http_kernel ``, ``request_stack ``, etc.). Then, it is propagated to all dependencies
378+ of these services, with a special case for event listeners, where only listed events
379+ are propagated to their related listeners.
380+
381+ It will replace, in cache for generated service factories, the PHP autoload by
382+ plain inlined ``include_once ``. The benefit is a complete bypass of the autoloader
383+ for services and their class hierarchy. The result is as significant performance improvement.
384+
385+ Use this tag with great caution, you have to be sure that the tagged service is always used.
386+
365387controller.argument_value_resolver
366388----------------------------------
367389
0 commit comments