Skip to content

Commit 83c1d22

Browse files
committed
minor #10070 Remove example of register a service where its id match to its class (l-vo)
This PR was merged into the 3.4 branch. Discussion ---------- Remove example of register a service where its id match to its class `ResolveClassPass` which resolve service definitions where class match to the service id is one of the first compiler pass processed (priority 100 in beforeOptimizationPasses phase). When adding a custom compiler pass, it is by default added to the beforeOptimizationPasses but with the default priority of 0. So the `ResolveClassPass` has already been executed and our custom service definition class isn't resolved. Commits ------- 4905190 Remove example of register a service where its id match to its class
2 parents 1a475bc + 4905190 commit 83c1d22

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

service_container/definitions.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ There are some helpful methods for working with the service definitions::
3838
// shortcut for the previous method
3939
$container->register('app.number_generator', \AppBundle\NumberGenerator::class);
4040

41-
// or create a service whose id matches its class
42-
$container->register(\AppBundle\NumberGenerator::class);
43-
4441
Working with a Definition
4542
-------------------------
4643

0 commit comments

Comments
 (0)