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

@@ -243,14 +243,14 @@ final readonly class PhpTokenizer implements TokenizerInterface
array $allTokens,
int $index
): Token {
// Determine token type with contextual classification
// Determine the token type with contextual classification
$type = $this->classifier->classify($phpToken, $allTokens, $index, $context);
return new Token(
type: $type,
value: $phpToken->text,
line: $phpToken->line,
position: $phpToken->pos ?? 0,
position: $phpToken->pos,
id: $phpToken->id,
context: $context->clone()
);

View File

@@ -7,19 +7,19 @@ namespace App\Framework\Tokenizer\ValueObjects;
/**
* Context information for a token
*/
final class TokenContext
final readonly class TokenContext
{
public function __construct(
public readonly bool $isInClass = false,
public readonly bool $isInFunction = false,
public readonly bool $isInNamespace = false,
public readonly bool $isInAttribute = false,
public readonly bool $isInDocComment = false,
public readonly ?string $currentClass = null,
public readonly ?string $currentFunction = null,
public readonly ?string $currentNamespace = null,
public readonly array $scopeStack = [],
public readonly int $nestingLevel = 0
public bool $isInClass = false,
public bool $isInFunction = false,
public bool $isInNamespace = false,
public bool $isInAttribute = false,
public bool $isInDocComment = false,
public ?string $currentClass = null,
public ?string $currentFunction = null,
public ?string $currentNamespace = null,
public array $scopeStack = [],
public int $nestingLevel = 0
) {
}