Merge pull request #1365 from nextcloud/enh/noid/deprecation-detector

add php-deprecation-detector
This commit is contained in:
Simon L 2022-11-05 21:56:26 +01:00 committed by GitHub
commit cd8ba20716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,29 @@
name: PHP Deprecation Detector
# See https://github.com/wapmorgan/PhpDeprecationDetector
on:
pull_request:
push:
branches:
- main
jobs:
psalm:
name: PHP Deprecation Detector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up php8.0
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: apcu
coverage: none
- name: Run script
run: |
set -x
cd php
composer global require wapmorgan/php-deprecation-detector dev-master
composer install
composer run php-deprecation-detector

View file

@ -21,6 +21,7 @@
"scripts": {
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l {} \\;",
"php-deprecation-detector": "find . -name \\*.php -not -path './vendor/*' -exec phpdd scan {} -n -t 8.0 \\;"
}
}