-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
PHPCS 3.5 - up minimum version or provide cross-version support ? #1654
Comments
I wouldn't raise the major version since you mentioned that the changes are non breaking. I'd leave the major change (3.0) for the release of PHPCS 4.0 |
The changes are (mostly) non-breaking for PHPCS, but when we'd remove the WPCS versions of the methods, that would be a breaking change for WPCS, i.e. a change requiring the major to change. |
I feel option 2 would have the least impact on users while not creating additional complexity for maintenance and development. |
Little update about this: The refactor this issue started with, will (for now) not go into PHPCS. Instead a new PHPCSUtils repo has been created which will contain the utility methods which were contained in the refactor and more. The new repo will be compatible with PHPCS 2.6.0 and higher and will also provide compatibility methods for PHPCS native utility methods which have undergone changes between PHPCS 2.6.0 and If you're interested, feel free to watch the repo. So, now the options we need to think about for WPCS will be slightly different.
So, the choices we now have to make are:
Opinions ? Other notes:
|
I'm just saddened that the util didn't get merged to PHPCS, especially after all the time you've spent in working on it. I'm definitely for using this, as all the other standards will benefit from it (I know that I will probably find a few places where utils can be used in I'm all for using Utils as soon as possible. Since this is a separate repo, we can use it in the external standards. but I'd rather have one place that is using it as a dependency, than adding it in the external repo, then have to take extra care when the WPCS adds it (guess this is just me being lazy 😄 ).
If we keep the original commits, and if the license is not clashing with the WPCS license then it should be ok to use 🤷♂ |
As it is a separate repo and unrelated to WPCS, keeping the original commits is not an option. |
If their license is compatible, just mentioning where the original code came from and the author who made it should be ok if I'm not mistaken. |
PHPCS 3.5.0 will contain major (non-breaking) changes under the hood. The idea for making those changes in PHPCS now, in a non-breaking way, is to make the transition to and - optionally - dual version support with, PHPCS 4.x easier and smoother.
Aside from deprecating a large number of the utility methods in the
File
class in favour of moving these - sometimes in improved form - to dedicated utility classes, the release will also introduce a whole slew of new utility methods to PHPCS, some based on or inspired by the utility methods which currently already exist in the WPCSSniff
class.This should make life easier in the long run as maintenance for those is then centralized, they will benefit from bugs reported and fixed by people maintaining other external standards and the functions will be more easily available to other (WPCS-adjacent and other) external standards.
While the release of PHPCS 3.5.0 may still be a few months off, I think it would be a good idea to have a think about how we want to handle this, especially with semver and the fact that there are numerous external standards which depend on WPCS (and may need to be adjusted as well), in mind.
In my opinion there are three options:
3.3.1
) as is.method_exists
toggles to WPCS methods which now have equivalent or better upstream versions.The deprecated methods will be removed in the next major version of WPCS.
Opinions ?
The text was updated successfully, but these errors were encountered: