PHP-CS-Fixer icon indicating copy to clipboard operation
PHP-CS-Fixer copied to clipboard

minor: Update PER set to v1.1

Open jrmajor opened this issue 2 years ago • 1 comments

  • [ ] protected_to_private, but for enums only
  • [ ] no_singleline_whitespace_before_semicolons, but for arrow functions only
  • [ ] #6518
  • [x] #6529
  • [ ] fn and => must be surrounded by a space
  • [ ] In multiline arrow functions, => must be placed after a new line
  • [ ] => must be indented once when placed after a new line
  • [ ] Method chaining must be fully multiline, with the first item on a new line

jrmajor avatar Aug 09 '22 17:08 jrmajor

Coverage Status

Coverage increased (+0.002%) to 92.909% when pulling b02db11a4bf7dac832b178e65e916aa6f3d82bb4 on jrmajor:feature/per11 into 198293be07fe57dda44b6d0ef7c64eef0eb1a217 on FriendsOfPHP:master.

coveralls avatar Aug 09 '22 19:08 coveralls

The cast_spaces rule should also be enforced per https://github.com/php-fig/per-coding-style/pull/40.

theodorejb avatar Feb 01 '23 15:02 theodorejb

Since this pull request has not had any activity within the last 90 days, I have marked it as stale.

I will close it if no further activity occurs within the next 14 days.

Please keep your branch up-to-date by rebasing it when main branch is ahead of it, thanks in advance!

github-actions[bot] avatar Jun 02 '23 12:06 github-actions[bot]

PER-CS was released as 2.0, not 1.1. And per #6707, we're trying to restructure the way the PER-CS rules are defined anyway.

Once that's in, though, this would make a reasonable starting point for the PER-CS 2.0 ruleset.

Crell avatar Jun 05 '23 19:06 Crell

This requires solid rebase after #6707 got merged, but personally I am not sure if it's good idea to provide all the changes in one PR. Maybe milestone would be better or issue with todo-list like here, but implemented with multiple smaller PRs?

CC: @keradus @kubawerlos

Wirone avatar Jun 06 '23 00:06 Wirone

I noticed that Laravel Pint with the per preset doesn't follow the standard in some rules. That's why I'm here.

Is anyone working on this? I tried to figure out what's going on in this PR to see if I could help, but I think I've only caught some of the logic. It all looks too much for me. Maybe someone could create a milestone/issue with a more detailed to-do list (and maybe I could be helpful there).

I think PER support is really important, and I want to start using it in my project as soon as possible.

asamofal avatar Jul 23 '23 20:07 asamofal

@asamofal There's #4502 for providing 100% coverage for PSR-12 / PER-CS v1. There's no other work for PER-CS v2 than this PR, which is outdated and should be closed IMHO. We should start with an issue or milestone, pointing all differences between v1 and v2 and implement it in steps, for easier review. This PR may help with determining scope, but I don't know if it's good to start with directly (rebasing, continuing work).

Wirone avatar Jul 23 '23 21:07 Wirone

I am going to close this in favor of #7247.

Wirone avatar Aug 23 '23 13:08 Wirone