Skip to content

Use PHP-Code-Style 2.0 #101

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

Merged
merged 4 commits into from
Mar 3, 2022
Merged

Use PHP-Code-Style 2.0 #101

merged 4 commits into from
Mar 3, 2022

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Mar 1, 2022

PHPCS: use PHP-Code-Style 2.0

  • Composer: require php-parallel-lint/php-code-style at 2.0 or higher.
  • Composer: remove the requirement for PHPCS. This will now be inherited from the code style repo.
  • Composer: allow execution of the PHPCS Composer plugin, which is a dependency of the PHP Code Style repo.
  • GH Actions, test workflow: adjust the removal of the PHPCS dependency to match.

Ruleset: update for PHP-Code-Style 2.0

  • Use the ruleset from PHP-Code-Style, but keep the custom property settings.
  • Set the testVersion for use with PHPCompatibility.
  • Improve the documentation in the ruleset.

Ruleset: add a few selective exclusions

... for things to be addressed at a later point in time and a few which don't need addressing at all.

CS: various minor fixes

Fix up the issues which will be flagged by PHP-Code-Style 2.0 and explicitly ignore a couple of (non-)issues.

jrfnl added 4 commits March 1, 2022 18:20
* Composer: require `php-parallel-lint/php-code-style` at 2.0 or higher.
* Composer: remove the requirement for PHPCS. This will now be inherited from the code style repo.
* Composer: allow execution of the PHPCS Composer plugin, which is a dependency of the PHP Code Style repo.
* GH Actions, test workflow: adjust the removal of the PHPCS dependency to match.
* Use the ruleset from PHP-Code-Style, but keep the custom property settings.
* Set the `testVersion` for use with PHPCompatibility.
* Improve the documentation in the ruleset.
... for things to be addressed at a later point in time and a few which don't need addressing at all.
Fix up the issues which will be flagged by PHP-Code-Style 2.0 and explicitly ignore a couple of (non-)issues.
@jrfnl jrfnl added this to the 2.0.0 milestone Mar 1, 2022
@jrfnl jrfnl requested a review from grogy March 1, 2022 17:54
@grogy
Copy link
Member

grogy commented Mar 3, 2022

I prefer fix incorrect code with changing ruleset, but it is my personal preference. Thank you, merged :-)

@grogy grogy merged commit 6562ec5 into develop Mar 3, 2022
@grogy grogy deleted the feature/update-code-style branch March 3, 2022 15:02
@jrfnl
Copy link
Collaborator Author

jrfnl commented Mar 3, 2022

@grogy Most issues flagged by the new ruleset have been fixed, I just excluded some which are more easily fixed in the "test refactor" project (and I have commits lined up to address all of those, except the cyclomatic complexity ones)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants