From 3e7c32e23d2e55e59f22a78400fc7119f14a037a Mon Sep 17 00:00:00 2001 From: Aimeos Date: Wed, 4 Feb 2026 10:46:33 +0100 Subject: [PATCH 1/3] Update UUID regex to be case insensitive --- src/Core/Schema/Concerns/MatchesIds.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Schema/Concerns/MatchesIds.php b/src/Core/Schema/Concerns/MatchesIds.php index ed40a34..d49979a 100644 --- a/src/Core/Schema/Concerns/MatchesIds.php +++ b/src/Core/Schema/Concerns/MatchesIds.php @@ -40,7 +40,7 @@ public function pattern(): string */ public function uuid(): static { - return $this->matchAs('[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}'); + return $this->matchAs('[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}'); } /** From 2009fae08dbd3f0b81726fc152a480403b0e1d87 Mon Sep 17 00:00:00 2001 From: Aimeos Date: Wed, 4 Feb 2026 10:50:50 +0100 Subject: [PATCH 2/3] Fixed test --- tests/Unit/Schema/Concerns/MatchesIdsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Schema/Concerns/MatchesIdsTest.php b/tests/Unit/Schema/Concerns/MatchesIdsTest.php index 2628ed5..8a4802b 100644 --- a/tests/Unit/Schema/Concerns/MatchesIdsTest.php +++ b/tests/Unit/Schema/Concerns/MatchesIdsTest.php @@ -40,7 +40,7 @@ public function testItIsUuid(): void }; $this->assertSame($id, $id->uuid()); - $this->assertSame('[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', $id->pattern()); + $this->assertSame('[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}', $id->pattern()); $this->assertTrue($id->match('fca1509e-9178-45fd-8a2b-ae819d34f7e6')); $this->assertFalse($id->match('fca1509e917845fd8a2bae819d34f7e6')); } @@ -79,4 +79,4 @@ public function testItIsCustom(): void $this->assertTrue($id->match('ABCD')); $this->assertFalse($id->match('abcd')); } -} \ No newline at end of file +} From 69043483574346d19e5b1a5d9a26a8a1ea6aef55 Mon Sep 17 00:00:00 2001 From: Aimeos Date: Wed, 4 Feb 2026 12:22:51 +0100 Subject: [PATCH 3/3] Add test for UUID matching in MatchesIdsTest --- tests/Unit/Schema/Concerns/MatchesIdsTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Unit/Schema/Concerns/MatchesIdsTest.php b/tests/Unit/Schema/Concerns/MatchesIdsTest.php index 8a4802b..8ef338d 100644 --- a/tests/Unit/Schema/Concerns/MatchesIdsTest.php +++ b/tests/Unit/Schema/Concerns/MatchesIdsTest.php @@ -41,6 +41,7 @@ public function testItIsUuid(): void $this->assertSame($id, $id->uuid()); $this->assertSame('[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}', $id->pattern()); + $this->assertTrue($id->match('FCA1509E-9178-45FD-8A2B-AE819d34f7E6')); $this->assertTrue($id->match('fca1509e-9178-45fd-8a2b-ae819d34f7e6')); $this->assertFalse($id->match('fca1509e917845fd8a2bae819d34f7e6')); }