-
Notifications
You must be signed in to change notification settings - Fork 62
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
chore: add cs-fixer v3 #243
Conversation
const ERR_INVALIDDATEFORMAT = 3; | ||
const ERR_REQUESTTIMESKEWED = 4; | ||
const ERR_INVALIDSIGNATURE = 5; | ||
public const ERR_NOAWSHEADER = 1; |
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.
This is supported from PHP 7.1
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.1 #243 +/- ##
=========================================
Coverage 94.14% 94.14%
Complexity 266 266
=========================================
Files 15 15
Lines 871 871
=========================================
Hits 820 820
Misses 51 51 ☔ View full report in Codecov by Sentry. |
de52cad
to
cff5f03
Compare
This comment was marked as resolved.
This comment was marked as resolved.
@@ -212,7 +212,7 @@ private function hmacsha1(string $key, string $message): string | |||
} | |||
$key = str_pad($key, $blocksize, chr(0x00)); | |||
$ipad = str_repeat(chr(0x36), $blocksize); | |||
$opad = str_repeat(chr(0x5c), $blocksize); | |||
$opad = str_repeat(chr(0x5C), $blocksize); |
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.
The codecov complaint is related to issue #193
I won't bother removing this code in the 5.1 release series, it can be removed in major version 6.
15e5951
to
7a9f650
Compare
Similar to sabre-io/xml#290
Add the ability to use php-cs-fixer major version 3.
Add
.php-cs-fixer.dist.php
(the settings of php-cs-fixer for major version 3) and put thenullable_type_declaration
check into it.Run cs-fixer on PHP 8.4.
Leave the old cs-fixer still running on PHP 7.1.
And run cs-fixer on every PHP version, to be sure. In CI,
composer
will choose whether to use major version 2 or 3 of php-cs-fixer.The newer cs-fixer v3 makes various nice fixes that do not break on PHP 7.1.
The old cs-fixer v2 is happy with the changes, it does not try to change them back - that is nice.
This is only needed for this old release series that still has PHP 7.1 support. We can run both cs-fixer and phpstan (and phpunit) on both PHP 7.1 through 8.4. I think that helps give confidence that the code works across that range of PHP versions.
Note: when I forward-port all this stuff to later major releases, I won't need to do all this tweaking because we move to supporting only PHP 7.4 and up. And that no longer needs php-cs-fixer major version 2.