fix(flash): make flash messages one-shot per request

This commit is contained in:
2026-04-15 18:45:45 +02:00
parent 63be2def76
commit 57b7920098
7 changed files with 149 additions and 20 deletions

View File

@@ -38,6 +38,17 @@ function flashFormErrors(FormErrors $errors, ?string $scope = null, string $keyP
}
}
/**
* Consume and remove flash messages matching any provided scope.
*
* @param array<int, string> $scopes
* @return array<int, array<string, mixed>>
*/
function flashConsumeForScopes(array $scopes): array
{
return Flash::consumeForScopes($scopes);
}
function requestExtractNestedReturnValue(mixed $value): string
{
if (is_string($value)) {