From 01ac2b1d87924ac1afbf81f75e8e7c5258b69251 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sun, 9 Feb 2025 11:07:43 +0100 Subject: [PATCH] Update phpstan-baseline and GitHub workflow dependencies Adjusted phpstan-baseline to include new type checks and removed outdated references. Updated GitHub Actions workflow to use the latest version of the upload-artifact action (v4.6.0). These changes enhance code quality checks and maintain up-to-date dependencies. --- .github/workflows/scorecards.yml | 2 +- phpstan-baseline.neon | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 9fecaf94..8fbe1a83 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -32,7 +32,7 @@ jobs: publish_results: true - name: "Upload artifact" - uses: actions/upload-artifact@v4.5.0 + uses: actions/upload-artifact@v4.6.0 with: name: SARIF file path: results.sarif diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4e0843a5..4c9388cb 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4033,10 +4033,22 @@ parameters: path: src/Bundle/Services/NestedTokenLoaderFactory.php - - message: '#^Parameter &\$tag by\-ref type of method Jose\\Experimental\\ContentEncryption\\AESCCM\:\:encryptContent\(\) expects string\|null, mixed given\.$#' - identifier: parameterByRef.type + message: '#^Call to function is_string\(\) with null will always evaluate to false\.$#' + identifier: function.impossibleType + count: 1 + path: src/Experimental/KeyEncryption/Chacha20Poly1305.php + + - + message: '#^Result of \|\| is always true\.$#' + identifier: booleanOr.alwaysTrue count: 1 - path: src/Experimental/ContentEncryption/AESCCM.php + path: src/Experimental/KeyEncryption/Chacha20Poly1305.php + + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: src/Experimental/KeyEncryption/Chacha20Poly1305.php - message: '#^Invalid type object to throw\.$#' @@ -4621,13 +4633,7 @@ parameters: path: src/Library/Encryption/Algorithm/ContentEncryption/AESCBCHS.php - - message: '#^Parameter &\$tag by\-ref type of method Jose\\Component\\Encryption\\Algorithm\\ContentEncryption\\AESGCM\:\:encryptContent\(\) expects string\|null, mixed given\.$#' - identifier: parameterByRef.type - count: 1 - path: src/Library/Encryption/Algorithm/ContentEncryption/AESGCM.php - - - - message: '#^Parameter \#1 \$src of static method Jose\\Component\\Core\\Util\\Base64UrlSafe\:\:encodeUnpadded\(\) expects string, mixed given\.$#' + message: '#^Parameter \#1 \$src of static method Jose\\Component\\Core\\Util\\Base64UrlSafe\:\:encodeUnpadded\(\) expects string, string\|null given\.$#' identifier: argument.type count: 1 path: src/Library/Encryption/Algorithm/KeyEncryption/AESGCMKW.php