-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Enable PHPCS rules for PHP 8.0 #9293
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
Enable PHPCS rules for PHP 8.0 #9293
Conversation
d636c3a
to
3687c3a
Compare
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 PR feels like it should be a follow up to a PR that introduces more type hints in all methods.
lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php
Outdated
Show resolved
Hide resolved
Thank you for the review @SenseException. I think, I should've been more clear about how this PR was generated. All I did was raising the PHP language level for CodeSniffer. All other changes are automated with
Yes, and that's my plan. Applying types everywhere fails miserably (see #9270), mainly because our doc blocks are not as accurate as they need to be for automating that change. Instead, I try to add types iteratively (see #9292) and if I find inaccurate typings while doing so, I backport the type fixes to 2.11.x (see #9273). Feel free to join that effort. ORM 3.0 is a good oppertunity to apply native types throughout the codebase. |
I like the change itself because a |
"All supported PHP versions" on the 3.0.x branch are 8.0 and 8.1. Given Yes, we should get the types straight, but let's do this in follow-ups. This PR sets up our tooling for the new language level. Once it's merged we can work on adding native type declarations where it makes sense. |
0e8ac8d
to
3019422
Compare
@@ -26,6 +26,7 @@ | |||
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/> | |||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/> | |||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming"/> | |||
<exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall"/> |
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've deactivated the rule for now because the discussion around it seems to block the merge. I can activate it again in a follow-up.
1942569
to
cfe35ae
Compare
Okay, once the build is green, I'll 👍 |
cfe35ae
to
1dfdc1d
Compare
This will add some types, especially to the test suite.
Let's see which tests fail and fix the issues on lower branches.