Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Added note on YAML mappings as objects#6590
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
components/yaml/introduction.rst Outdated
| Yamlmappings_ are basically associative arrays. You can instruct the parser to return | ||
| mappings as objects (i.e. ``\stdClass`` instances):: | ||
| $object = $parser->parse('{"hello": "world"}', false, false, true); |
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.
should make use ofYaml::parse()
dantleech commentedMay 21, 2016
Updated. |
34f243e to983720dCompareHeahDude commentedMay 21, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
closes#6524. |
components/yaml/introduction.rst Outdated
| ..versionadded::2.7 | ||
| This feature was introduced in Symfony 2.7 |
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.
I would move this just below the "Objects for Mappings" headline.
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.
And we can reword this a bit:
Support for parsing mappings as objects was introduced in Symfony 2.7.
components/yaml/introduction.rst Outdated
| echo $object->foo; // bar | ||
| ..versionadded::2.7 | ||
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.
this empty line should be removed (versionadded directive is a strange one)
dantleech commentedMay 21, 2016
Updated |
components/yaml/introduction.rst Outdated
| .................... | ||
| ..versionadded::2.7 | ||
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.
after your pushes, it's this line that should be removed
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.
yeah i saw :)
83ba2fb to81ea3e2Comparedantleech commentedMay 21, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Updated |
| .................... | ||
| ..versionadded::2.6 | ||
| Support for parsing mappings as objects was introduced in Symfony 2.6. |
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.
It was added in 2.7.
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.
Hmm, it was added toParser in 2.6 and andYaml::parse in 2.7 :/
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.
I think we should prefer the static API (see#6598) so using 2.7 here is the best idea imo.
HeahDude commentedMay 21, 2016
👍 |
components/yaml/introduction.rst Outdated
| Yaml:ref:`mappings<yaml-format-collections>` are basically associative | ||
| arrays. You can instruct the parser to return mappings as objects (i.e. | ||
| ``\stdClass`` instances) by setting the forth argument to ``true``:: |
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.
fourth
wouterj commentedMay 21, 2016
👍 |
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#6590).Discussion----------Added note on YAML mappings as objects| Q | A| ------------- | ---| Doc fix? | no| New docs? | yes| Applies to | 2.7 > 3.0Depends on#6582Commits-------e9de4ca Added note on YAML mappings as objects
xabbuh commentedMay 21, 2016
Thank you@dantleech! |
* 2.7: Simplified the contribution article for Symfony Docs Update routing.rst [#6590] fix version in versionadded directive Added note on YAML mappings as objects use static Yaml API Adding a description for the use_microseconds parameter introduced in MonologBundle v2.11 Clarify signed requests in the ESI renderer
* 2.8: Simplified the contribution article for Symfony Docs Update routing.rst [#6590] fix version in versionadded directive Added note on YAML mappings as objects use static Yaml API Adding a description for the use_microseconds parameter introduced in MonologBundle v2.11 Clarify signed requests in the ESI renderer
* 3.0: Simplified the contribution article for Symfony Docs Update routing.rst [#6590] fix version in versionadded directive Added note on YAML mappings as objects use static Yaml API Adding a description for the use_microseconds parameter introduced in MonologBundle v2.11 Clarify signed requests in the ESI renderer refs#5898 Fix updates of testing.rst for 3.0
Depends on#6582