Skip to content

Commit

Permalink
bug #4886 [Best Pracitices] restore example in the "Service: No Class…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
weaverryan committed Jan 30, 2015
2 parents 3bb7b61 + 0a678d2 commit 7e84533
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion best_practices/business-logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ the class namespace as a parameter:
# app/config/services.yml
# service definition with class namespace as parameter
parameters:
slugger.class: AppBundle\Utils\Slugger
services:
app.slugger:
class: AppBundle\Utils\Slugger
class: "%slugger.class%"
This practice is cumbersome and completely unnecessary for your own services:

Expand Down

0 comments on commit 7e84533

Please sign in to comment.