Skip to content

Commit 7e84533

Browse files
committed
bug #4886 [Best Pracitices] restore example in the "Service: No Class Parameter" section (u-voelkel)
This PR was merged into the 2.3 branch. Discussion ---------- [Best Pracitices] restore example in the "Service: No Class Parameter" section | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | In 1fb20e5 the 'how to NOT do it' config example in the "Best Practices -> Organizing Your Business Logic -> Service: No Class Parameter" section was changed to actually follow the recommendation. It is especially confusing as the example in the section "Services: Naming and Format" is exactly the same (besides the comment) Commits ------- 0a678d2 fixed indentation 73ff5ea restore the how to NOT do it example in the "Service: No Class Parameter" section
2 parents 3bb7b61 + 0a678d2 commit 7e84533

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

best_practices/business-logic.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,12 @@ the class namespace as a parameter:
140140
# app/config/services.yml
141141
142142
# service definition with class namespace as parameter
143+
parameters:
144+
slugger.class: AppBundle\Utils\Slugger
145+
143146
services:
144147
app.slugger:
145-
class: AppBundle\Utils\Slugger
148+
class: "%slugger.class%"
146149
147150
This practice is cumbersome and completely unnecessary for your own services:
148151

0 commit comments

Comments
 (0)