fix(Console): add void as valid return type for command methods
All checks were successful
Test Runner / test-php (push) Successful in 31s
Deploy Application / deploy (push) Successful in 1m42s
Test Runner / test-basic (push) Successful in 7s

The MethodSignatureAnalyzer was rejecting command methods with void return
type, causing the schedule:run command to fail validation.
This commit is contained in:
2025-11-26 06:16:09 +01:00
parent 386baff65f
commit c93d3f07a2
73 changed files with 1674 additions and 163 deletions

View File

@@ -73,6 +73,7 @@ final readonly class ExceptionContextBuilder
if ($baseContext !== null) {
return $this->mergeContexts($cached, $baseContext);
}
return $cached;
}
}
@@ -109,6 +110,7 @@ final readonly class ExceptionContextBuilder
// Extract session ID
if (property_exists($request, 'session') && $request->session !== null) {
$sessionId = $request->session->id->toString();
try {
$context = $context->withSessionId(SessionId::fromString($sessionId));
} catch (\InvalidArgumentException) {
@@ -162,13 +164,13 @@ final readonly class ExceptionContextBuilder
if ($base->component !== null && $merged->component === null) {
$merged = $merged->withOperation($merged->operation ?? '', $base->component);
}
if (!empty($base->data)) {
if (! empty($base->data)) {
$merged = $merged->addData($base->data);
}
if (!empty($base->debug)) {
if (! empty($base->debug)) {
$merged = $merged->addDebug($base->debug);
}
if (!empty($base->metadata)) {
if (! empty($base->metadata)) {
$merged = $merged->addMetadata($base->metadata);
}
if ($base->userId !== null) {
@@ -186,7 +188,7 @@ final readonly class ExceptionContextBuilder
if ($base->userAgent !== null) {
$merged = $merged->withUserAgent($base->userAgent);
}
if (!empty($base->tags)) {
if (! empty($base->tags)) {
$merged = $merged->withTags(...array_merge($merged->tags, $base->tags));
}
@@ -261,7 +263,7 @@ final readonly class ExceptionContextBuilder
]);
// Add scope tags
if (!empty($scopeContext->tags)) {
if (! empty($scopeContext->tags)) {
$context = $context->withTags(...$scopeContext->tags);
}
@@ -299,4 +301,3 @@ final readonly class ExceptionContextBuilder
return null;
}
}