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

@@ -5,8 +5,8 @@ declare(strict_types=1);
namespace App\Framework\ExceptionHandling\Audit;
use App\Framework\Audit\AuditLogger;
use App\Framework\Audit\ValueObjects\AuditEntry;
use App\Framework\Audit\ValueObjects\AuditableAction;
use App\Framework\Audit\ValueObjects\AuditEntry;
use App\Framework\DateTime\Clock;
use App\Framework\ExceptionHandling\Context\ExceptionContextData;
use App\Framework\ExceptionHandling\Context\ExceptionContextProvider;
@@ -44,7 +44,7 @@ final readonly class ExceptionAuditLogger
$context = $context ?? $this->getContext($exception);
// Skip if not auditable
if (!$this->isAuditable($context)) {
if (! $this->isAuditable($context)) {
return;
}
@@ -192,6 +192,7 @@ final readonly class ExceptionAuditLogger
// Remove common suffixes
$component = $context->component;
$component = preg_replace('/Service$|Repository$|Manager$|Handler$/', '', $component);
return strtolower($component);
}
@@ -246,7 +247,7 @@ final readonly class ExceptionAuditLogger
];
// Add context data
if (!empty($context->data)) {
if (! empty($context->data)) {
$metadata['context_data'] = $context->data;
}
@@ -267,7 +268,7 @@ final readonly class ExceptionAuditLogger
}
// Add tags
if (!empty($context->tags)) {
if (! empty($context->tags)) {
$metadata['tags'] = $context->tags;
}
@@ -283,7 +284,7 @@ final readonly class ExceptionAuditLogger
// Merge with existing metadata (but exclude internal fields)
$excludeKeys = ['auditable', 'audit_action', 'entity_type'];
foreach ($context->metadata as $key => $value) {
if (!in_array($key, $excludeKeys, true)) {
if (! in_array($key, $excludeKeys, true)) {
$metadata[$key] = $value;
}
}
@@ -306,4 +307,3 @@ final readonly class ExceptionAuditLogger
return $this->contextProvider->get($exception);
}
}