Run PHPCompatibility sniff for PHP 8.2+.

This commit is contained in:
Michael Stenta 2023-10-06 15:45:39 -04:00
parent 3398eb0170
commit 50803a5c83
2 changed files with 3 additions and 3 deletions

View File

@ -77,8 +77,8 @@ jobs:
run: docker run farmos/farmos:3.x-dev phpstan analyze --memory-limit 1G /opt/drupal/web/profiles/farm
- name: Check PHP compatibility of contrib modules and themes (ignore warnings).
run: |
docker run farmos/farmos:3.x-dev phpcs --standard=PHPCompatibility --runtime-set testVersion 7.4- --warning-severity=0 /opt/drupal/web/modules
docker run farmos/farmos:3.x-dev phpcs --standard=PHPCompatibility --runtime-set testVersion 7.4- --warning-severity=0 /opt/drupal/web/themes
docker run farmos/farmos:3.x-dev phpcs --standard=PHPCompatibility --runtime-set testVersion 8.2- --warning-severity=0 /opt/drupal/web/modules
docker run farmos/farmos:3.x-dev phpcs --standard=PHPCompatibility --runtime-set testVersion 8.2- --warning-severity=0 /opt/drupal/web/themes
test:
name: Run PHPUnit tests
runs-on: ubuntu-latest

View File

@ -57,7 +57,7 @@ RUN { \
echo ' <exclude name="DrupalPractice.Commenting.CommentEmptyLine.SpacingAfter"/>'; \
echo ' </rule>'; \
echo ' <rule ref="PHPCompatibility"/>'; \
echo ' <config name="testVersion" value="7.4-"/>'; \
echo ' <config name="testVersion" value="8.2-"/>'; \
echo ' <rule ref="Internal.Tokenizer.Exception"><severity>0</severity></rule>'; \
echo '</ruleset>'; \
} > /var/farmOS/phpcs.xml