Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
YamlEncoder handle yml format#28815
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
0bfb101 to4271939CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
stof commentedOct 11, 2018
|
4271939 to261e5f8CompareNek- commentedOct 11, 2018
Well, it's related to#28768 and was somehow validated by@nicolas-grekas |
Uh oh!
There was an error while loading.Please reload this page.
261e5f8 to491825bCompare491825b tod8640f9Comparefabpot commentedOct 11, 2018
Thank you@mcsky. |
This PR was merged into the 4.2-dev branch.Discussion----------YamlEncoder handle yml format| Q | A| ------------- | ---| Branch? | ?| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#28768| License | MIT`Symfony\Component\Serializer\Encoder\YamlEncoder` now handle the `yml` format too```use Symfony\Component\Serializer\Serializer;use Symfony\Component\Serializer\Encoder\YamlEncoder;$serializer = new Serializer([], [new YamlEncoder()]);$content = file_get_contents(__DIR__ . '/test.yml');$data = $serializer->decode($content, YamlEncoder::ALTERNATIVE_FORMAT);```Let me know if something is wrong for youCommits-------d8640f9 YamlEncoder handle yml extension
…nt from 'YamlEncoder' (kevin-biig)This PR was merged into the 4.2-dev branch.Discussion----------'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder'A little fix of my [previous PR](#28815)This PR changes the constant visibility of the `yml` format as private.Because as@stof [mentionned](#28815 (comment)) `yml` isn't a format, so the constant shoudn't be public.Otherwise, this will be confusing while using autocomplete, you see two formats. The user can ask himself if there is a difference between `yaml` / `yml`.No need of that :)| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Fixed tickets | -| License | MIT| Doc PR |Commits-------674b359 'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder' class
Uh oh!
There was an error while loading.Please reload this page.
Symfony\Component\Serializer\Encoder\YamlEncodernow handle theymlformat tooLet me know if something is wrong for you