From 2a4ccc8f1adafdac0ad7cad9f1640b18d2d66cb1 Mon Sep 17 00:00:00 2001 From: fs Date: Tue, 21 Apr 2026 22:01:12 +0200 Subject: [PATCH] chore(qa): clear stale PHPStan baseline entry and PHPUnit deprecations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two pre-existing findings surfaced during the export-feature test run. Both are trivial housekeeping, not related to the feature: - phpstan-baseline.neon: drop the stale ignore for RequestInput::wantsJson — the method is now called from the helpdesk security-level endpoint and the new export flavor helper, so PHPStan no longer matched the pattern and failed with `ignore.unmatched` (non-ignorable). - tests/Service/Auth/SsoUserLinkServiceTest.php: replace the deprecated isType('array') / isType('string') assertions with the PHPUnit 13-compatible isArray() / isString() equivalents. Gates after cleanup: PHPUnit 1880 OK (0 deprecations), PHPStan 0 errors. Co-Authored-By: Claude Opus 4.7 (1M context) --- phpstan-baseline.neon | 6 ------ tests/Service/Auth/SsoUserLinkServiceTest.php | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 115c576..441198c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -150,12 +150,6 @@ parameters: count: 1 path: core/Http/Input/RequestInput.php - - - message: '#^Public method "MintyPHP\\Http\\Input\\RequestInput\:\:wantsJson\(\)" is never used$#' - identifier: public.method.unused - count: 1 - path: core/Http/Input/RequestInput.php - - message: '#^Public method "MintyPHP\\Http\\Input\\RequestInputFactory\:\:create\(\)" is never used$#' identifier: public.method.unused diff --git a/tests/Service/Auth/SsoUserLinkServiceTest.php b/tests/Service/Auth/SsoUserLinkServiceTest.php index 9de678b..820945d 100644 --- a/tests/Service/Auth/SsoUserLinkServiceTest.php +++ b/tests/Service/Auth/SsoUserLinkServiceTest.php @@ -688,14 +688,14 @@ class SsoUserLinkServiceTest extends TestCase $userWriteRepo = $this->createMock(UserWriteRepositoryInterface::class); $userWriteRepo->expects($this->once()) ->method('updateProfileFieldsFromSso') - ->with(60, $this->isType('array')) + ->with(60, $this->isArray()) ->willReturn(true); $avatarService = $this->createMock(UserAvatarService::class); $avatarService->expects($this->any())->method('isValidUuid')->with('user-uuid-60')->willReturn(true); $avatarService->expects($this->once()) ->method('saveBinary') - ->with('user-uuid-60', $this->isType('string'), 'image/jpeg') + ->with('user-uuid-60', $this->isString(), 'image/jpeg') ->willReturn(['ok' => true]); $tenantSsoService = $this->createMock(TenantSsoService::class);