Skip to content

Commit c1adbcb

Browse files
committed
chore: adds php 7.4 compatibiliy checking
1 parent 4862079 commit c1adbcb

File tree

3 files changed

+201
-2
lines changed

3 files changed

+201
-2
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"guzzlehttp/psr7": "^1.0 || ^2.0",
3535
"php-http/curl-client": "^2.0",
3636
"php-http/mock-client": "^1.0",
37+
"phpcompatibility/php-compatibility": "dev-develop",
3738
"phpstan/phpstan": "~2.1",
3839
"phpunit/phpunit": "^9.5 || ^10.0",
3940
"slevomat/coding-standard": "^8.20",

composer.lock

Lines changed: 191 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
<!-- Use PSR-12 standard -->
2222
<rule ref="PSR12"/>
2323

24+
<!-- Check PHP 7.4 compatibility -->
25+
<rule ref="PHPCompatibility">
26+
<!-- Exclude functions that are polyfilled in src/polyfills.php -->
27+
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound"/>
28+
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_containsFound"/>
29+
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_starts_withFound"/>
30+
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_ends_withFound"/>
31+
</rule>
32+
2433
<!-- Enforce namespace best practices -->
2534
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse" />
2635
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" />

0 commit comments

Comments
 (0)