-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added a new services.yml file to comply with Symfony Best Practices #727
Conversation
javiereguiluz
commented
Oct 20, 2014
Q | A |
---|---|
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #725 |
License | MIT |
Doc PR | - |
👍 |
services: | ||
# service_name: | ||
# class: AppBundle\Directory\ClassName | ||
# arguments: [@other_service_name, "plain_value", %parameter_name%] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%parameter_name%
must be in quotes to be valid yaml
@Tobion thanks for reporting this error! You are absolutely right and I've just updated the file. |
👍 |
You should then also include |
@xabbuh Why? It's not necessary. |
@Tobion I added the quotes suggested by @xabbuh before reading your comment. Even if they are not mandatory, do you think it would be a good idea to add them for consistency reaons? Or do you think it's better to not include them? By the way, I switched "other_service_name" by "another_service_name". It sounds better than me, but please tell me what you think. Thanks! |
@Tobion The |
Then you would also need to put |
The backslash has no special meaning outside double quoted strings. Even worse, "\D" and "\C" are no valid escape sequences, so the backslash would need to be escaped. |
I was referring to the "consistency" javier was talking about. |
Then I misunderstood you. |
Thank you @javiereguiluz. |