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

Move from protected to private when possible #1510

Merged

Conversation

jordisala1991
Copy link
Member

@jordisala1991 jordisala1991 commented Jul 31, 2022

Subject

I am targeting this branch, because this is BC break.

Since a lot of classes are final now, it makes no sense in a lot of cases to use protected, better use private and have the benefits of it (unused code removal, less extension points, etc...).

This is a first iteration, we might try to reduce further visibility of public / protected remaining things.

I saw some of this while doing PHPStan level 6.

Changelog

### Changed
- Changed visibility for most protected properties / methods to private, since classes are final.

@VincentLanglet VincentLanglet merged commit 0790a51 into sonata-project:4.x Jul 31, 2022
@jordisala1991 jordisala1991 deleted the hotfix/decrease-visibility branch July 31, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants