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

@@ -10,7 +10,7 @@ use App\Framework\Console\ConsoleInput;
use App\Framework\Console\ConsoleOutput;
use App\Framework\Core\PathProvider;
use App\Framework\DateTime\Clock;
use App\Framework\Discovery\DiscoveryCache;
use App\Framework\Discovery\Storage\DiscoveryCacheManager;
/**
* Unified console commands for clearing discovery-related caches
@@ -23,9 +23,10 @@ use App\Framework\Discovery\DiscoveryCache;
final readonly class ClearDiscoveryCache
{
public function __construct(
private DiscoveryCacheManager $discoveryCacheManager,
private ConsoleOutput $output,
private Cache $cache,
private Clock $clock,
private ConsoleOutput $output,
private PathProvider $pathProvider
) {
}
@@ -36,14 +37,12 @@ final readonly class ClearDiscoveryCache
$this->output->writeLine('Clearing Discovery cache...');
try {
$discoveryCache = new DiscoveryCache($this->cache, $this->clock);
if ($discoveryCache->flush()) {
if ($this->discoveryCacheManager->clearAll()) {
$this->output->writeLine('<success>Discovery cache cleared successfully!</success>');
return 0;
} else {
$this->output->writeLine('<error>Failed to clear Discovery cache - flush returned false</error>');
$this->output->writeLine('<error>Failed to clear Discovery cache - clearAll returned false</error>');
return 1;
}
@@ -61,9 +60,8 @@ final readonly class ClearDiscoveryCache
$success = true;
// Clear discovery cache
$discoveryCache = new DiscoveryCache($this->cache, $this->clock);
if ($discoveryCache->flush()) {
// Clear discovery cache using the cache manager
if ($this->discoveryCacheManager->clearAll()) {
$this->output->writeLine('✓ Discovery cache cleared');
} else {
$this->output->writeLine('✗ Failed to clear Discovery cache');