@@ -20,6 +20,7 @@ Tag Name Usage
20
20
`assetic.templating.twig `_ Remove this service if Twig templating is disabled
21
21
`auto_alias `_ Define aliases based on the value of container parameters
22
22
`console.command `_ Add a command
23
+ `container.hot_path `_ Add to list of always needed services
23
24
`controller.argument_value_resolver `_ Register a value resolver for controller arguments such as ``Request ``
24
25
`data_collector `_ Create a class that collects custom data for the profiler
25
26
`doctrine.event_listener `_ Add a Doctrine event listener
@@ -362,6 +363,27 @@ console.command
362
363
For details on registering your own commands in the service container, read
363
364
:doc: `/console/commands_as_services `.
364
365
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
+
365
387
controller.argument_value_resolver
366
388
----------------------------------
367
389
0 commit comments