From 0e36ae0ba9cee3ee900be7cbf59271a487708f84 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 5 Nov 2022 21:42:30 +0100 Subject: [PATCH] add php-deprecation-detector Signed-off-by: Simon L --- .../workflows/php-deprecation-detector.yml | 29 +++++++++++++++++++ php/composer.json | 3 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/php-deprecation-detector.yml 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 \\;" } }