-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify service parameters usages #3528
Conversation
Parameters do not need to be flat strings, they can also be arrays. For the XML | ||
format, you need to use the ``type="collection"`` attribute for all parameters that are | ||
arrays. | ||
Parameters do not need to be flat strings, they can also contain array values. |
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.
changed this to array values
, to make it explicitly clear that this isn't a way to inherit parameters.
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.
yea, very nice change
👍 nice addition! |
The used ``.`` notation is just a | ||
:ref:`Symfony convention <service-naming-conventions>` to make parameters | ||
easier to read. Parameters are just flat key-value elements, they can't be | ||
inherited. |
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.
how about can't be organized into a nested array
? What do you think - I wasn't totally clear on "inherited".
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.
yes, that's better :)
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.
can you make this change real quick? That'll let me merge without any mods :)
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.
done
Awesome, thanks Wouter! |
This PR was merged into the 2.3 branch. Discussion ---------- Clarify service parameters usages | Q | A | --- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | IRC On the IRC channel, there was some confusing about parameters. The dot notation looked like parameters are one big namespaced tree, with each group a different node. This PR adds a caution, so people really know it's just a convention and parameters are just key-value elements. Commits ------- aaddfcd Applied comment 05492b2 Clarify parameters conventions
On the IRC channel, there was some confusing about parameters. The dot
notation looked like parameters are one big namespaced tree, with each
group a different node.
This PR adds a caution, so people really know it's just a convention and
parameters are just key-value elements.