Skip to content

Commit dfeacb1

Browse files
abnegateclaude
andcommitted
fix: accept integer values in Sequence validator for $tenant VAR_ID type
SQL adapters return integer tenant values from getTenant(), but the Sequence validator only accepted strings. Cast int to string before validation to support both SQL (integer) and MongoDB (UUID string) tenants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 706f3b9 commit dfeacb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Database/Validator/Sequence.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public function isValid($value): bool
4141
return false;
4242
}
4343

44+
if (\is_int($value)) {
45+
$value = (string) $value;
46+
}
47+
4448
if (!\is_string($value)) {
4549
return false;
4650
}

0 commit comments

Comments
 (0)