-
Notifications
You must be signed in to change notification settings - Fork 9
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: Adds php-cs-fixer on commit #16
Conversation
I forgot one thing in the previous pull request. You could add a strict types declaration to all php files.
And then you have to modify
to
|
I have a thought for the 7.2 CI issue.
|
Just an update. I dug into PHP unit to find a version that was compatible with 7.2. It took quite a bit of shenanigans since |
This change enables PSR-12 syntax formatting on commit for developers. It ensures that code is consistent on commit. In order for this to work in CI, the versions for phpunit and php-cs-fixer needed to be widened by enough to accomodate 7.2. Resolves #14
4b0faae
to
8403f6a
Compare
"ockcyp/covers-validator": "1.3.3", | ||
"phpunit/phpunit": "^8.5.13||^9.5.0", | ||
"ockcyp/covers-validator": "^1.3.3", | ||
"phpunit/phpunit": "^6.5.14||^7.0.15||^8.5.13||^9.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting the largest change for 7.2 compatibility in CI is here. Our tests need to run on phpunit 6.5+ which shouldn't be an issue
@jrzepa strict typings were added. LMK if you see anything else |
@jakobo Everything looks good for me. I think you can merge it :) |
This builds on #13 and adds an on-commit hook using the composer-git-hooks library. It's not foolproof, but it offers some consistency in ensuring code is cleaned up to a common format when committed. Obviously VSCode and other tools do this for us, but if you're using a non PSR-12 editor, it's nice that the code is being cleaned up on commit.
EDIT There's a couple of additional changes required to make this work
Resolves #14