8000 minor #28830 'yml' is not a format and shouldn't be visible as consta… · symfony/symfony@261c0de · GitHub
[go: up one dir, main page]

Skip to content

Commit 261c0de

Browse files
committed
minor #28830 'yml' is not a format and shouldn't be visible as constant 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
2 parents 975f58f + 674b359 commit 261c0de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Encoder/YamlEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class YamlEncoder implements EncoderInterface, DecoderInterface
2424
{
2525
const FORMAT = 'yaml';
26-
const ALTERNATIVE_FORMAT = 'yml';
26+
private const ALTERNATIVE_FORMAT = 'yml';
2727

2828
private $dumper;
2929
private $parser;

0 commit comments

Comments
 (0)
0