Skip to content

Commit

Permalink
Enforce PHP 8.0 (and up) compatibility through PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
coenjacobs committed Sep 9, 2024
1 parent 640ed30 commit 31f3c5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "8.0"
Expand All @@ -36,7 +37,9 @@
"phpstan/extension-installer": "^1.4",
"league/flysystem": "^2.5",
"symfony/console": "^5.4",
"symfony/finder": "^5.4"
"symfony/finder": "^5.4",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"phpcompatibility/php-compatibility": "dev-develop"
},
"scripts": {
"test": [
Expand Down
6 changes: 5 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
<ruleset name="mozart">
<description>Coding standard ruleset based on the PSR-2 coding standard.</description>
<rule ref="PSR2"/>

<rule ref="PHPCompatibility"/>
<config name="testVersion" value="8.0-"/>

<file>./src</file>
</ruleset>
</ruleset>

0 comments on commit 31f3c5e

Please sign in to comment.