From 057f3f3924c1e71fa3cb7f28339ab3cb55fa4861 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:54:17 +0200 Subject: [PATCH 1/4] code_samples.yaml: Ignore more SA --- .github/workflows/code_samples.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index 472511f194..4788ee2200 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -52,7 +52,30 @@ jobs: composer config audit.ignore --json '{ "GHSA-68jq-c3rv-pcrr": "As this is for code quality tests and not to run a production DXP, this can be ignored.", "GHSA-fc86-6rv6-2jpm": "As this is for code quality tests and not to run a production DXP, this can be ignored.", - "GHSA-r7cg-qjjm-xhqq": "As this is for code quality tests and not to run a production DXP, this can be ignored." + "GHSA-r7cg-qjjm-xhqq": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-5k7f-wvjj-jrgw": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-sjvz-tbbr-vwth": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-h8hf-ytnd-5t9q": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-wwb1-81rc-pd65": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-hgmw-wn4d-hpcy": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-kvv6-36cr-fkzb": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-n14z-jjjg-g8vd": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-3mcc-k66d-pydb": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-gw7n-z4yx-7xjt": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-dpx1-78wg-1kqs": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-21g2-dzjv-sky5": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-yhcn-xrg3-68b1": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-2wrf-1xmk-1pky": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-6319-ffpf-gx66": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-n7sg-8f52-pqtf": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-8kk8-h2xr-h5nx": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-2rbx-bjdx-4d4d": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-fs5b-x5k4-1h39": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-fbvq-z33h-r2np": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-g9zw-qxh8-pq8w": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-yd6k-t2gh-1m43": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-1tmc-rt7x-12w6": "As this is for code quality tests and not to run a production DXP, this can be ignored.", + "PKSA-xx6c-6d96-db2w": "As this is for code quality tests and not to run a production DXP, this can be ignored." }' - uses: ramsey/composer-install@v3 From 06c34f692e83ea729336bacbb6bb416ae2e47464 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:18:41 +0200 Subject: [PATCH 2/4] code_samples.yaml: Ignore baseline issues --- .github/workflows/code_samples.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index 4788ee2200..676355cb70 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -82,6 +82,12 @@ jobs: with: dependency-versions: highest + - if: matrix.php == '7.4' + id: phpstan-unmatched + name: Don't report unmatched ignored errors + run: | + echo ' reportUnmatchedIgnoredErrors: false' >> phpstan.neon + - name: Run PHPStan analysis id: phpstan continue-on-error: true From 9a4ab8be8e380d8956a4369d767915ebf692b97a Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:24:33 +0200 Subject: [PATCH 3/4] Revert "code_samples.yaml: Ignore baseline issues" This reverts commit 06c34f692e83ea729336bacbb6bb416ae2e47464. --- .github/workflows/code_samples.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index 676355cb70..4788ee2200 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -82,12 +82,6 @@ jobs: with: dependency-versions: highest - - if: matrix.php == '7.4' - id: phpstan-unmatched - name: Don't report unmatched ignored errors - run: | - echo ' reportUnmatchedIgnoredErrors: false' >> phpstan.neon - - name: Run PHPStan analysis id: phpstan continue-on-error: true From 16cf74074ef60ff699cc0ffee9f3d438245a6f23 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:27:25 +0200 Subject: [PATCH 4/4] phpstan-baseline.neon: adapt ignored patterns to PHP 7.4 --- phpstan-baseline.neon | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2482490a96..f576b7b59c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -121,7 +121,7 @@ parameters: path: code_samples/api/public_php_api/src/Controller/CustomFilterController.php - - message: '#^Parameter \#1 \$string of function base64_encode expects string, string\|false given\.$#' + message: '#^Parameter \#1 \$str(ing)? of function base64_encode expects string, string\|false given\.$#' identifier: argument.type count: 1 path: code_samples/api/rest_api/create_image.json.php @@ -151,7 +151,7 @@ parameters: path: code_samples/api/rest_api/create_image.xml.php - - message: '#^Parameter \#1 \$string of function base64_encode expects string, string\|false given\.$#' + message: '#^Parameter \#1 \$str(ing)? of function base64_encode expects string, string\|false given\.$#' identifier: argument.type count: 1 path: code_samples/api/rest_api/create_image.xml.php @@ -181,13 +181,13 @@ parameters: path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' + message: '#^Parameter \#1 (\.\.\.\$arrays|\$arr1) of function array_merge expects array, iterable\ given\.$#' identifier: argument.type count: 1 path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php - - message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' + message: '#^Parameter \#2 \.\.\.\$ar(rays|gs) of function array_merge expects array, iterable\ given\.$#' identifier: argument.type count: 1 path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php @@ -283,7 +283,7 @@ parameters: path: code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php - - message: '#^Parameter \#2 \$string of function explode expects string, string\|null given\.$#' + message: '#^Parameter \#2 \$str(ing)? of function explode expects string, string\|null given\.$#' identifier: argument.type count: 1 path: code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php