-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PHP 8.2 | PSR1/SideEffects: allow for readonly classes #3728
PHP 8.2 | PSR1/SideEffects: allow for readonly classes #3728
Conversation
Includes unit test. Ref: * https://wiki.php.net/rfc/readonly_classes
Any update regarding this? |
Any update regarding this? |
It'd be amazing if we could get this merged. I'm itching to start using |
what is missing here? |
I suspect this is waiting to have all test's successful, this one is still failing |
No, it's not. PR #3686 has been open for longer than this PR to address that particular issue, which you could have known if you'd read the original issue: #3727 (comment). What it's waiting for is maintainer time. |
It'd be amazing to start using |
Waiting for this too. Is there anything blocking this small change? |
@gsherwood Hi, did you consider adding few more people as maintainers to this project so that it does not block ton of companies to adapt new PHP features? I can confirm that every year I actually need to wait months for this project to onboard new PHP syntax to be able to use it in our projects. I understand that open-source is hard and takes ton of time, but I believe the community will help you with that on such core features. Thank you for considering this. |
I'm down to help! 👍🏻 |
I'm totally down to help as well. @janedbal is right, I actually have a PR on phpinsights wich will also needs this improvement on php code sniffer to be merged. I'd be happy to contribute in any way, so this kind of mandatory tool for every project keeps on living. |
After seeing all the offers for help here, I've spend a little time creating a more extensive contributor guide. I look forward to seeing your contributions! As for this PR, after the announcement a couple of weeks ago, I spend some time creating a PR priority list, which we are currently working our way through. This PR is first on the list for our next maintainers call session in two weeks time (and no, I will not merge my own PRs). |
When will be release of 3.8.0 ? |
In addition to the extra maintainers / or release date discussion: Maybe the current 3.8.0 scope is too big? It currently contains 46 closed, 25 open tickets. If some/most open tickets could be postponed to a later version, it would enable getting all the nice done work published. :) |
For the time being, anyone encountering this problem can bypass this error by using this phpcs comment before the class declaration: // phpcs:disable PSR1.Files.SideEffects
final readonly class WhateverClassName This way CI/CD tests won't fail and you can revert the file to the original state once version |
FYI: this fix is included in today's PHP_CodeSniffer 3.8.0 release. As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo). |
@jrfnl is it possible to mark this repo as abandoned and archive? Maybe add something in composer to inform |
@eerison As @fredden pointed out, a PR to add a note at the top of the readme is open. Archiving the repo will possibly be done in six/twelve months time or so, as once the repo is archived you cannot comment on issues/PRs anymore, which is very limiting. For example, I wouldn't have been able to post my previous message informing you of the fix being in the 3.8.0 release, so archiving the repo now would likely hinder instead of help the information about the repo move spreading. |
@jrfnl |
@asanikovich please see #3933. |
Includes unit test.
Ref:
Fixes #3727