File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
components/dependency_injection Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,23 @@ been run, use::
423
423
PassConfig::TYPE_AFTER_REMOVING
424
424
);
425
425
426
+ .. versionadded :: 3.2
427
+ The option to prioritize compiler passes was added in Symfony 3.2.
428
+
429
+ You can also control the order in which compiler passes are run for each
430
+ compilation phase. Use the optional third argument of ``addCompilerPass() `` to
431
+ set the priority as an integer number. The default priority is ``0 `` and the higher
432
+ its value, the earlier it's executed::
433
+
434
+ // ...
435
+ // FirstPass is executed after SecondPass because its priority is lower
436
+ $container->addCompilerPass(
437
+ new FirstPass(), PassConfig::TYPE_AFTER_REMOVING, 10
438
+ );
439
+ $container->addCompilerPass(
440
+ new SecondPass(), PassConfig::TYPE_AFTER_REMOVING, 30
441
+ );
442
+
426
443
.. _components-dependency-injection-dumping :
427
444
428
445
Dumping the Configuration for Performance
You can’t perform that action at this time.
0 commit comments