From 58b9b244bbeea69313a83f79f91a20e3f41ec6c3 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 24 Feb 2026 01:27:00 +0100 Subject: [PATCH 1/2] chore: bump phpstan and rector to latest --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 41627bf64..3ce5426cd 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "psr/http-factory": "^1.0", "psr/http-message": "^1.0|^2.0", "psr/log": "^3.0.0", - "rector/rector": "2.3.1", + "rector/rector": "2.3.8", "symfony/cache": "^7.3", "symfony/filesystem": "^7.3", "symfony/mailer": "^7.2.6", @@ -75,7 +75,7 @@ "patrickbussmann/oauth2-apple": "^0.3", "phpat/phpat": "^0.11.0", "phpbench/phpbench": "^1.4", - "phpstan/phpstan": "2.1.33", + "phpstan/phpstan": "2.1.40", "phpunit/phpunit": "^12.5.8", "predis/predis": "^3.0.0", "riskio/oauth2-auth0": "^2.4", From 39c391b3316ed5182002975d2afb4489822cf7c6 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 24 Feb 2026 01:27:49 +0100 Subject: [PATCH 2/2] refactor(validation): throw on invalid flag --- packages/validation/src/Rules/IsJsonString.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/validation/src/Rules/IsJsonString.php b/packages/validation/src/Rules/IsJsonString.php index 246460543..7bfe4e758 100644 --- a/packages/validation/src/Rules/IsJsonString.php +++ b/packages/validation/src/Rules/IsJsonString.php @@ -6,6 +6,9 @@ use Attribute; use Tempest\Validation\Rule; +use ValueError; + +use const JSON_INVALID_UTF8_IGNORE; /** * Validates that the value is a valid JSON string. @@ -31,6 +34,10 @@ public function isValid(mixed $value): bool } if ($this->flags !== null) { + if ($this->flags !== JSON_INVALID_UTF8_IGNORE) { + throw new ValueError('Invalid JSON validation flags provided.'); + } + $arguments['flags'] = $this->flags; }