Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Introduce PHP compatibility check #7844

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/sca.yml
Expand Up @@ -70,6 +70,9 @@ jobs:
- name: Check - phpstan
keradus marked this conversation as resolved.
Show resolved Hide resolved
run: ./dev-tools/vendor/bin/phpstan analyse --ansi

- name: Check - PHP compatibility
run: composer php-compatibility

- name: Check - composer-unused
run: ./dev-tools/vendor/bin/composer-unused --no-progress --excludePackage=composer/xdebug-handler

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@
/compose.override.yaml
/composer.lock
/dev-tools/bin/
/dev-tools/php-compatibility/cache.json
/dev-tools/phpstan/cache/
/dev-tools/vendor/
/php-cs-fixer.phar
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Expand Up @@ -94,6 +94,7 @@
"@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
"@composer normalize --working-dir=dev-tools --dry-run composer.json"
],
"php-compatibility": "@php dev-tools/vendor/bin/phpcs -p --standard=dev-tools/php-compatibility/phpcs-php-compatibility.xml",
Wirone marked this conversation as resolved.
Show resolved Hide resolved
"phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
"phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
"qa": "@quality-assurance",
Expand Down Expand Up @@ -155,6 +156,7 @@
"install-tools": "Install DEV tools",
"mess-detector": "Analyse code with Mess Detector",
"normalize": "Run normalization for composer.json files",
"php-compatibility": "Check compatibility with all supported PHP versions",
"phpstan": "Run PHPStan analysis",
"phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
"post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
Expand Down
5 changes: 4 additions & 1 deletion dev-tools/composer.json
Expand Up @@ -5,6 +5,8 @@
"icanhazstring/composer-unused": "^0.8.11",
"maglnet/composer-require-checker": "^4.8.0",
"mi-schi/phpmd-extension": "^4.3.0",
"phpcompatibility/php-compatibility": "10.x-dev as 9.99.0",
"phpcompatibility/phpcompatibility-symfony": "^1.2",
"phpmd/phpmd": "^2.15.0",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.51",
Expand All @@ -15,7 +17,8 @@
"allow-plugins": {
"ergebnis/composer-normalize": true,
"infection/extension-installer": false,
"phpstan/extension-installer": true
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"optimize-autoloader": true,
"platform": {
Expand Down