Skip to content

Commit 20f4d8b

Browse files
authored
Merge pull request #2 from district09/feature/phpcompatibility
Add phpcompatibility checker
2 parents ec36abd + 708a25f commit 20f4d8b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,11 @@ Configure the paths to these files in PHPStorm:
137137
Set "Coding Standard" to "Custom" and set the path to `phpcs.qa-php.xml`.
138138
* Languages & Frameworks > PHP > Test Frameworks > Test Runner
139139
Set "Default configuration file" to `phpunit.qa-php.xml`.
140+
141+
### PHP compatibility
142+
143+
In order to check php compatibility you can use the phpcs `PHPCompatibility` sniff:
144+
145+
```bash
146+
php vendor/bin/phpcs -p --ignore="*/vendor/*" --extensions=php,inc,module,install,theme --runtime-set testVersion 8.1 --standard=PHPCompatibility ./web/modules/contrib
147+
```

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"enlightn/security-checker": "^1.4",
4646
"ergebnis/composer-normalize": "^2.8",
4747
"nette/neon": "^3.2",
48+
"phpcompatibility/php-compatibility": "^9.3",
4849
"phpmd/phpmd": "^2.11",
4950
"phpro/grumphp-shim": "^1.1",
5051
"phpspec/prophecy": "^1.10",

0 commit comments

Comments
 (0)