diff --git a/.github/workflows/php-deprecation-detector.yml b/.github/workflows/php-deprecation-detector.yml new file mode 100644 index 00000000..bd25a68e --- /dev/null +++ b/.github/workflows/php-deprecation-detector.yml @@ -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 \ No newline at end of file diff --git a/php/composer.json b/php/composer.json index 55fecbc6..5a0d46ed 100644 --- a/php/composer.json +++ b/php/composer.json @@ -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 \\;" } }