From 608036b85485e20d0741b191850ff3b50acd34d8 Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Wed, 18 Dec 2024 14:15:54 +0100 Subject: [PATCH] [INFR] Enhanced workflows - Exclude from linting for PHP < 8.1 --- .github/workflows/build.ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.ci.yml b/.github/workflows/build.ci.yml index bd18d67b..8a4b881b 100644 --- a/.github/workflows/build.ci.yml +++ b/.github/workflows/build.ci.yml @@ -86,7 +86,18 @@ jobs: mkdir build/dist mkdir build/phpdoc - - name: Run Lint + - name: Run Lint (PHP 8.0 and lower) + if: ${{ matrix.phpversion < '8.1' }} + run: | + for afile in $(find . -type f -name '*.php' -path './src*/*' -not -path "*codes*" -not -path "*codelistsenum*" -print); do + php -l $afile + done + for afile in $(find . -type f -name '*.php' -path './tests*/*' -print); do + php -l $afile + done + + - name: Run Lint (PHP 8.1 and higher) + if: ${{ matrix.phpversion >= '8.1' }} run: | for afile in $(find . -type f -name '*.php' -path './src*/*' -print); do php -l $afile