Skip to content
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

[make:serializer:encoder] set public constant visibility modifier #869

Merged
merged 1 commit into from May 4, 2021

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented May 4, 2021

Since PHP 7.1 - class constants can have a visibility modifier. The Symfony coding standards require the visibility modifier to be set.

make:serializer:encoder now defaults to the public modifier for the FORMAT const.

@jrushlow jrushlow mentioned this pull request May 4, 2021
3 tasks
@@ -7,7 +7,7 @@

class <?= $class_name ?> implements EncoderInterface, DecoderInterface
{
const FORMAT = '<?= $format ?>';
public const FORMAT = '<?= $format ?>';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, but what's the use-case (why make it public) for it being public?

@weaverryan
Copy link
Member

I'm merging - but I'm still not sure about the tiny detail of whether the visiblity should be public or private :)

@weaverryan weaverryan merged commit c981ac2 into symfony:main May 4, 2021
weaverryan added a commit that referenced this pull request May 4, 2021
This PR was squashed before being merged into the 1.0-dev branch.

Discussion
----------

[ci] upgrade php-cs-fixer 2.x -> 3.0

- [ ] depends on symfony/recipes#942
- [x] depends on #868
- [x] depends on #869

Commits
-------

2396836 [ci] upgrade php-cs-fixer 2.x -> 3.0
@jrushlow jrushlow deleted the feature/make-serializer-const branch May 3, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants