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

feat: Clone PER-CS1.0 to PER-CS2.0 to prepare for adding new rules #7249

Merged
merged 8 commits into from
Sep 8, 2023

Conversation

Crell
Copy link
Contributor

@Crell Crell commented Aug 23, 2023

Base change for #7247.

What it says on the tin. This should make PER-CS 2.0 a clone of PER-CS 1.0. We can then start adding new rules to it in future PRs.

@Wirone suggested marking it experimental. I don't know if there's a formal way to do that, so I just stuck it in the description text. If there's a better place for it, let me know and I can update. (Or just add yourself, I'm easy.)

@Crell Crell mentioned this pull request Aug 23, 2023
16 tasks
@coveralls
Copy link

coveralls commented Aug 23, 2023

Coverage Status

coverage: 94.639% (+0.002%) from 94.637% when pulling 024a41f on Crell:percs2 into d0c9a72 on PHP-CS-Fixer:master.

@Wirone Wirone changed the title Clone PER-CS1.0 to PER-CS2.0 to prepare for adding new rules. feat: Clone PER-CS1.0 to PER-CS2.0 to prepare for adding new rules. Aug 23, 2023
@Crell
Copy link
Contributor Author

Crell commented Aug 25, 2023

How about that, I got everything to pass on first try. 😸

Rule set ``@PER-CS2.0``
=======================

EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.
Copy link
Member

@keradus keradus Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question

why Experimental?
what is experimental here?

(same for sibling Risky set)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because first item on the checklist in #7247 - we just need to let people know that ruleset is not a final version of PER-CS v2.

Copy link
Member

@keradus keradus Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because first item on the checklist in #7247

it's not answering my question, actually ;)

we just need to let people know that ruleset is not a final version of PER-CS v2.

none rulset is considered final and each ruleset can evolve in future, they are not locked nor promised to not be modified ever in future.
2 best representative examples:

  • PSR12 ruleset is present, yet not reflecting each rule described in PSR spec. amount of rules will increase over time, covering more and more aspects of PSR spec
  • Symfony ruleset is present, yet standard is evolving over time, so also the ruleset is getting adjusted

with that, we never considered a rulset to be "experimental/internal" because "it's not complete".

with above, please remove the experimental marker. using this ruleset has nothing to do with experiments.

Copy link
Member

@Wirone Wirone Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not answering my question, actually ;)

It IS answering, @Crell did it because I asked for it. Whether that makes sense is totally different story 😉.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i got you asked for it, but still that part didn't resolved my question 😓
later part did, thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR, @Crell , please remove the experimental marker

Copy link
Member

@keradus keradus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some questions

Rule set ``@PER-CS2.0``
=======================

EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.
Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.

Rule set ``@PER-CS2.0:risky``
=============================

EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_. This set contains rules that are risky.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_. This set contains rules that are risky.
Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_. This set contains rules that are risky.


public function getDescription(): string
{
return 'EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return 'EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.';
return 'Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.';

doc/ruleSets/PER-CS2.0.rst Outdated Show resolved Hide resolved

public function getDescription(): string
{
return 'EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return 'EXPERIMENTAL: Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.';
return 'Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.';

/**
* @internal
*
* PER Coding Style v1.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* PER Coding Style v1.0.
* PER Coding Style v2.0.

@keradus keradus changed the title feat: Clone PER-CS1.0 to PER-CS2.0 to prepare for adding new rules. feat: Clone PER-CS1.0 to PER-CS2.0 to prepare for adding new rules Sep 8, 2023
@keradus keradus mentioned this pull request Sep 8, 2023
@keradus keradus enabled auto-merge (squash) September 8, 2023 19:12
@keradus keradus merged commit 0cacea0 into PHP-CS-Fixer:master Sep 8, 2023
15 checks passed
@Wirone
Copy link
Member

Wirone commented Sep 8, 2023

Thank you @Crell 🍻!

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

Successfully merging this pull request may close these issues.

None yet

4 participants