-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
BCFile::getMemberProperties(): sync with upstream #646
BCFile::getMemberProperties(): sync with upstream #646
Conversation
PHPCS 3.12.0 adds support for reporting if properties are final; polyfill the upstream method and copy over the tests. Ref: PHPCSStandards/PHP_CodeSniffer#834 Closes PHPCSStandards#645
No idea why this is failing, apparently the actual results don't include |
@DanielEScherzer Thank you for working on this.
That's my bad. There should be a CONTRIBUTING file, but I never got round to writing it. Would you like me to coach you through this ? or would you prefer I take over and make the additional changes needed ? The short of it, is like this (with some historic context):
Does that help explain things well enough ? Some additional context: |
Sorry - the doc block was so long that I missed it
Okay, I was thrown by the
for the location of the failure in the github actions logs. I've updated Variables::getMemberProperties() and
Sounds interesting, though I would ask why not just merge PHPCSUtils into PHPCS if
|
Nearly there. There is one more thing to account for: PHPCSUtils supports both PHPCS 3.x as well as 4.x and PHPCS 4.0 will contain a tokenizer change related to the PHP 8.0 "namespaced names as one token" change, so the expectations for some of the tests need to take this into account, like
I'm not sure I understand the first bullet ? What is now PHPCSUtils, was originally proposed to go into PHPCS itself: squizlabs/PHP_CodeSniffer#2189, but by the time I was asked to redo 160+ commits for the third time, I called it quits and published it as PHPCSUtils. Merging Utils into PHPCS itself has various downsides, which is why I'm not keen on that. Making PHPCSUtils a runtime dependency for PHPCS would not have the same downsides. Think:
|
@DanielEScherzer Just checking in, I'd love to get this merged, but the tests are still failing on PHPCS 4.0. Will you have a chance to update the PR for this ? |
Sorry, I tried to figure out updating this, but I'm not sure how to get things to pass against both versions of PHPCS (3 and 4) with both PHP 7.4 tokenization and 8.0+ tokenization. I figured I would try to contribute my upstream changes to this repo too, but I don't understand enough about this repo to debug more - should I just close this? |
No worries. If it's okay with you, I'll just add an extra commit with the necessary changes so you can see what was needed. [Edit]: Oh and I'd be happy to answer any questions you have about this repo. Happy to support you in your contributions. |
... and remove some redundant end comments.
6796de7
to
6fed215
Compare
@DanielEScherzer I've added an extra commit which fixes things up. I'll merge this once the build has passed (hoping I didn't miss anything). |
PHPCS 3.12.0 adds support for reporting if properties are final; polyfill the upstream method and copy over the tests.
Ref: PHPCSStandards/PHP_CodeSniffer#834
Closes #645