Skip to content

Commit 0d951c9

Browse files
committed
php compatiblilty check
1 parent 431c183 commit 0d951c9

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
php-version: ["8.1", "8.2", "8.3", "8.4"]
26+
php-version: ["8.1", "8.2", "8.3", "8.4", "8.5"]
2727
experimental: [false]
2828
os: [ubuntu-latest]
2929
coverage-extension: [pcov]

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ COMPOSER=$(PHP) -d "apc.enable_cli=0" $(shell which composer)
8484
PHPDOC=$(shell which phpDocumentor)
8585

8686
# phpstan version
87-
PHPSTANVER=2.1.32
87+
PHPSTANVER=2.1.33
8888

8989
# --- MAKE TARGETS ---
9090

@@ -214,7 +214,7 @@ endif
214214
# Test source code for coding standard violations
215215
.PHONY: lint
216216
lint:
217-
./vendor/bin/phpcs --ignore="\./vendor/" --standard=phpcs.xml src test
217+
./vendor/bin/phpcs --standard=phpcs.xml
218218
./vendor/bin/phpmd src text codesize,unusedcode,naming,design --exclude */vendor/*
219219
./vendor/bin/phpmd test text unusedcode,naming,design --exclude */vendor/*
220220
php -r 'exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.33
1+
2.0.34

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,17 @@
2121
"require": {
2222
"php": ">=8.1"
2323
},
24+
"config": {
25+
"allow-plugins": {
26+
"dealerdirect/phpcodesniffer-composer-installer": true
27+
}
28+
},
2429
"require-dev": {
2530
"pdepend/pdepend": "2.16.2",
2631
"phpmd/phpmd": "2.15.0",
2732
"phpunit/phpunit": "12.4.4 || 11.5.44 || 10.5.58",
28-
"squizlabs/php_codesniffer": "4.0.1"
33+
"squizlabs/php_codesniffer": "4.0.1",
34+
"phpcompatibility/php-compatibility": "^10.0.0@dev"
2935
},
3036
"autoload": {
3137
"psr-4": {

phpcs.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?xml version="1.0"?>
2-
<ruleset name="backward-compatibility">
3-
<description>PSR-12 for PHP less than 7.1</description>
4-
<rule ref="PSR12">
5-
<exclude name="PSR12.Properties.ConstantVisibility"/>
6-
</rule>
2+
<ruleset name="PHP-compatibility">
3+
<description>Test code for compatibility with supported PHP versions</description>
4+
<rule ref="PHPCompatibility"/>
5+
<config name="testVersion" value="8.1-8.5"/>
6+
<file>src</file>
7+
<file>test</file>
8+
<exclude-pattern>./vendor/*</exclude-pattern>
9+
<arg value="ps"/>
710
</ruleset>

0 commit comments

Comments
 (0)