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

PSR-PER 2.0.0 has been released #3793

Closed
jrfnl opened this issue Apr 5, 2023 · 8 comments
Closed

PSR-PER 2.0.0 has been released #3793

jrfnl opened this issue Apr 5, 2023 · 8 comments

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Apr 5, 2023

PSR-PER is an evolving standard which builds onto PSR-12.

The first "release" (= updated standards publication) since the fork of PSR-12 has just been published.

I'm opening this ticket to allow for a discussion on if and if so, how to handle these evolving standards in PHPCS.

Refs:

@viktorprogger
Copy link

Are there any plans on implementing this?

@jrfnl
Copy link
Contributor Author

jrfnl commented May 23, 2023

@viktorprogger Still up for discussion, but I'd deem it likely (once we've worked through most of the backlog).

@kenguest
Copy link
Contributor

kenguest commented Oct 4, 2023

Is there anything that can be done to help nudge this along?

Also, can I just note that the PER for Coding Standards shouldn't be referred to as a PSR - it is PER CS 2.0 :-)

@jrfnl
Copy link
Contributor Author

jrfnl commented Oct 4, 2023

@kenguest Well, aside from the decision which still needs to be taken about this, it might be good to create an action list of the differences between PSR-12 and PSR-PER ?

For each difference, it will need to be determined whether there is an existing sniff which could handle this (possibly with a public property setting) or whether a new sniff is needed.

Another thing to have a good think about would be how to handle versioning, as without some form of versioning, a PSR-PER ruleset would be a moving target which could randomly start failing CI builds due to new rules being introduced (and being sniffed for).

@kenguest
Copy link
Contributor

@jrfnl I'm working on a list of changes between the two standards, then an action list.
PER-CS is at version 2 at the moment, and there will be distinct version numbers so it should just be a case of having one set of sniffs called PERCS200 (for v2.0.0) and so on.

@lombervid
Copy link

As far as I've seen, PER 2.0 only adds some rules on top of PSR-12 for the new language features.

Here the differences can be better appreciated:
https://github.com/php-fig/per-coding-style/compare/8201676d799ca5d03bec8ee702df1dd3fda8d2b0..2.0.0

@kenguest
Copy link
Contributor

@jrfnl We've (php fig) got a migration document now, it's at https://github.com/php-fig/per-coding-style/blob/master/migration-2.0.md

@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 2, 2023

Closing as replaced by PHPCSStandards/PHP_CodeSniffer#29

@jrfnl jrfnl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants