fix: resolve RedisCache array offset error and improve discovery diagnostics

- Fix RedisCache driver to handle MGET failures gracefully with fallback
- Add comprehensive discovery context comparison debug tools
- Identify root cause: WEB context discovery missing 166 items vs CLI
- WEB context missing RequestFactory class entirely (52 vs 69 commands)
- Improved exception handling with detailed binding diagnostics
This commit is contained in:
2025-09-12 20:05:18 +02:00
parent 8040d3e7a5
commit e30753ba0e
46990 changed files with 10789682 additions and 89639 deletions

View File

@@ -101,6 +101,7 @@ enum Base32Alphabet: string
/**
* Get recommended use cases for this alphabet
* @return array<int, string>
*/
public function getUseCases(): array
{

View File

@@ -204,6 +204,7 @@ final readonly class Base32Encoder
/**
* Get available alphabets
* @return array<int, Base32Alphabet>
*/
public static function getAvailableAlphabets(): array
{

View File

@@ -170,6 +170,18 @@ final class EventDispatcher implements EventDispatcherInterface
return $this;
}
/**
* Alias für addHandler - für bessere API Kompatibilität
*/
public function listen(
string $eventClass,
callable $handler,
?int $priority = null,
bool $stopPropagation = false
): self {
return $this->addHandler($eventClass, $handler, $priority, $stopPropagation);
}
/**
* Prüft, ob Handler für den angegebenen Event-Typ registriert sind
*

View File

@@ -17,14 +17,17 @@ use App\Framework\Reflection\WrappedReflectionClass;
*/
final class InterfaceImplementationVisitor implements FileVisitor, ReflectionAwareVisitor
{
/** @var array<string, mixed> */
private array $interfaces = [];
/** @var array<string, array<int, string>> */
private array $implementations = [];
/** @var array<string, array<int, string>> */
private array $implementationsByClass = [];
/**
* @param array $targetInterfaces Die zu suchenden Interfaces
* @param array<int, string> $targetInterfaces Die zu suchenden Interfaces
*/
public function __construct(
private readonly array $targetInterfaces = []
@@ -147,6 +150,9 @@ final class InterfaceImplementationVisitor implements FileVisitor, ReflectionAwa
return CacheKey::fromString('interface_implementations');
}
/**
* @return array<string, mixed>
*/
public function getCacheableData(): array
{
return [
@@ -157,6 +163,7 @@ final class InterfaceImplementationVisitor implements FileVisitor, ReflectionAwa
/**
* Gibt alle Implementierungen eines Interfaces zurück
* @return array<int, string>
*/
public function getImplementations(string $interface): array
{
@@ -174,6 +181,7 @@ final class InterfaceImplementationVisitor implements FileVisitor, ReflectionAwa
/**
* Gibt alle Interfaces zurück, die eine Klasse implementiert
* @return array<int, string>
*/
public function getClassInterfaces(string $className): array
{
@@ -182,6 +190,7 @@ final class InterfaceImplementationVisitor implements FileVisitor, ReflectionAwa
/**
* Gibt alle gefundenen Implementierungen zurück
* @return array<string, array<int, string>>
*/
public function getAllImplementations(): array
{

View File

@@ -16,13 +16,20 @@ use App\Framework\Performance\PerformanceCategory;
*/
final class ContainerPerformanceMonitor
{
/**
* @var array<string, float>
*/
private array $thresholds;
/**
* @var array<string, float>
*/
private array $operationStartTimes = [];
public function __construct(
private readonly PerformanceCollectorInterface $collector,
private readonly ?Logger $logger = null,
/** @param array<string, float> $customThresholds */
array $customThresholds = []
) {
$this->thresholds = array_merge([
@@ -102,6 +109,7 @@ final class ContainerPerformanceMonitor
/**
* Get performance recommendations based on collected metrics
* @return array<int, string>
*/
public function getOptimizationRecommendations(): array
{
@@ -174,6 +182,7 @@ final class ContainerPerformanceMonitor
/**
* Create a performance report for debugging
* @return array<string, mixed>
*/
public function generatePerformanceReport(): array
{

View File

@@ -18,6 +18,9 @@ final readonly class ContainerPerformanceResult
) {
}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return [

View File

@@ -188,6 +188,14 @@ final readonly class ClassName
return $this->shortName;
}
/**
* Explicit toString method
*/
public function toString(): string
{
return $this->fullyQualified;
}
/**
* Get string representation for debugging
*/

View File

@@ -106,6 +106,11 @@ final readonly class Percentage
return $this->value === 0.0;
}
public function isZero(): bool
{
return $this->value === 0.0;
}
public function isFull(): bool
{
return $this->value === 100.0;

View File

@@ -99,6 +99,14 @@ final readonly class Score
return $this->value;
}
/**
* Get score as decimal value (alias for value())
*/
public function toDecimal(): float
{
return $this->value;
}
/**
* Convert to percentage using framework Percentage object
*/

View File

@@ -106,6 +106,22 @@ final readonly class Timestamp
return $this->toDateTime(new DateTimeZone('UTC'))->format('Y-m-d\TH:i:s.uP');
}
/**
* Convert to ISO 8601 string format (alias)
*/
public function toIso8601String(): string
{
return $this->toIso8601();
}
/**
* Convert to SQL timestamp string format
*/
public function toSqlString(): string
{
return $this->format('Y-m-d H:i:s');
}
/**
* Format timestamp
*/

View File

@@ -307,16 +307,25 @@ final readonly class WarmupResult
) {
}
/**
* @return array<int, WarmupOperation>
*/
public function getSuccessfulOperations(): array
{
return array_filter($this->operations, fn ($op) => $op->success);
}
/**
* @return array<int, WarmupOperation>
*/
public function getFailedOperations(): array
{
return array_filter($this->operations, fn ($op) => ! $op->success);
}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
@@ -344,6 +353,9 @@ final readonly class WarmupOperation
) {
}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return [