Skip to content

Commit 2f2dd02

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Add container.hot_path to built-in service tags Fix filename Removed the Debug component Replace tagged with tagged_iterator for service tagging PHP example BC promise: only optional arguments can be removed
2 parents 1e756fe + c880766 commit 2f2dd02

File tree

7 files changed

+33
-19
lines changed

7 files changed

+33
-19
lines changed

_build/redirection_map

+2
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@
428428
/contributing/community/other /contributing/community
429429
/profiler/storage /profiler
430430
/setup/composer /setup
431+
<<<<<<< HEAD
431432
/security/security_checker /setup
432433
/setup/built_in_web_server /setup/symfony_server
433434
/service_container/parameters /configuration
@@ -474,3 +475,4 @@
474475
/best_practices/security /best_practices
475476
/best_practices/web-assets /best_practices
476477
/best_practices/tests /best_practices
478+
/components/debug https://github.com/symfony/debug

components/debug.rst

-11
This file was deleted.

configuration/front_controllers_and_kernel.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ to `decorate`_ the kernel with additional features. Examples include:
4444
* Configuring the autoloader or adding additional autoloading mechanisms;
4545
* Adding HTTP level caching by wrapping the kernel with an instance of
4646
:ref:`HttpCache <symfony-gateway-cache>`;
47-
* Enabling the :doc:`Debug Component </components/debug>`.
47+
* Enabling the `Debug component`_.
4848

4949
You can choose the front controller that's used by adding it in the URL, like:
5050

@@ -266,3 +266,4 @@ includes the following:
266266

267267
.. _`front controller`: https://en.wikipedia.org/wiki/Front_Controller_pattern
268268
.. _`decorate`: https://en.wikipedia.org/wiki/Decorator_pattern
269+
.. _Debug component: https://github.com/symfony/debug

contributing/code/bc.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Change name No
204204
Move to parent interface Yes
205205
Add argument without a default value No
206206
Add argument with a default value No
207-
Remove argument Yes [3]_
207+
Remove argument No [3]_
208208
Add default value to an argument No
209209
Remove default value of an argument No
210210
Add type hint to an argument No
@@ -272,7 +272,7 @@ Make final No [6]_
272272
Move to parent class Yes
273273
Add argument without a default value No
274274
Add argument with a default value No [7]_ [8]_
275-
Remove argument Yes [3]_
275+
Remove argument No [3]_
276276
Add default value to an argument No [7]_ [8]_
277277
Remove default value of an argument No
278278
Add type hint to an argument No [7]_ [8]_
@@ -291,7 +291,7 @@ Make public No [7]_ [8]_
291291
Move to parent class Yes
292292
Add argument without a default value No [7]_
293293
Add argument with a default value No [7]_ [8]_
294-
Remove argument Yes [3]_
294+
Remove argument No [3]_
295295
Add default value to an argument No [7]_ [8]_
296296
Remove default value of an argument No [7]_
297297
Add type hint to an argument No [7]_ [8]_
@@ -416,8 +416,8 @@ Turn static into non static No
416416
.. [2] The added parent interface must not introduce any new methods that don't
417417
exist in the interface already.
418418
419-
.. [3] Only the last argument(s) of a method may be removed, as PHP does not
420-
care about additional arguments that you pass to a method.
419+
.. [3] Only the last optional argument(s) of a method may be removed, as PHP
420+
does not care about additional arguments that you pass to a method.
421421
422422
.. [4] When changing the parent class, the original parent class must remain an
423423
ancestor of the class.

reference/dic_tags.rst

+22
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Tag Name Usage
1313
======================================== ========================================================================
1414
`auto_alias`_ Define aliases based on the value of container parameters
1515
`console.command`_ Add a command
16+
`container.hot_path`_ Add to list of always needed services
1617
`controller.argument_value_resolver`_ Register a value resolver for controller arguments such as ``Request``
1718
`data_collector`_ Create a class that collects custom data for the profiler
1819
`doctrine.event_listener`_ Add a Doctrine event listener
@@ -180,6 +181,27 @@ console.command
180181
For details on registering your own commands in the service container, read
181182
:doc:`/console/commands_as_services`.
182183

184+
container.hot_path
185+
------------------
186+
187+
.. versionadded:: 3.4
188+
189+
The ``container.hot_path`` tag was introduced in Symfony 3.4.
190+
191+
**Purpose**: Add to list of always needed services
192+
193+
This tag identifies the services that are always needed. It is only applied to
194+
a very short list of bootstrapping services (like ``router``, ``event_dispatcher``,
195+
``http_kernel``, ``request_stack``, etc.). Then, it is propagated to all dependencies
196+
of these services, with a special case for event listeners, where only listed events
197+
are propagated to their related listeners.
198+
199+
It will replace, in cache for generated service factories, the PHP autoload by
200+
plain inlined ``include_once``. The benefit is a complete bypass of the autoloader
201+
for services and their class hierarchy. The result is as significant performance improvement.
202+
203+
Use this tag with great caution, you have to be sure that the tagged service is always used.
204+
183205
controller.argument_value_resolver
184206
----------------------------------
185207

service_container/tags.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ first constructor argument to the ``App\HandlerCollection`` service:
553553
554554
$services->set(App\HandlerCollection::class)
555555
// inject all services tagged with app.handler as first argument
556-
->args([tagged('app.handler')])
556+
->args([tagged_iterator('app.handler')])
557557
;
558558
};
559559

session/locale_sticky_session.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ locale value before they are redirected to their first page.
142142
To do this, you need an event subscriber on the ``security.interactive_login``
143143
event::
144144

145-
// src/EventSubscriber/UserLocaleListener.php
145+
// src/EventSubscriber/UserLocaleSubscriber.php
146146
namespace App\EventSubscriber;
147147

148148
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

0 commit comments

Comments
 (0)