Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
use App\Framework\Cache\Cache;
use App\Framework\Core\ValueObjects\Timestamp;
use App\Framework\Discovery\Storage\DiscoveryCacheManager;
use App\Framework\Discovery\ValueObjects\DiscoveryContext;
use App\Framework\Discovery\ValueObjects\DiscoveryOptions;
use App\Framework\Discovery\ValueObjects\ScanType;
use App\Framework\Filesystem\FileSystemService;
beforeEach(function () {
$this->mockCache = Mockery::mock(Cache::class);
$this->mockClock = Mockery::mock(\App\Framework\DateTime\Clock::class);
$this->realFileSystemService = new FileSystemService(); // Use real service since it's final
$this->mockClock->shouldReceive('time')->andReturn(Timestamp::fromFloat(microtime(true)))->byDefault();
$this->mockClock->shouldReceive('now')->andReturn(new \DateTimeImmutable())->byDefault();
$this->discoveryCacheManager = new DiscoveryCacheManager(
$this->mockCache,
$this->mockClock,
$this->realFileSystemService
);
// Create test context
$this->testContext = new DiscoveryContext(
paths: ['/test/path'],
scanType: ScanType::FULL,
options: new DiscoveryOptions(),
startTime: $this->mockClock->now()
);
});
afterEach(function () {
Mockery::close();
});
describe('Basic Cache Operations', function () {
it('cache manager can be instantiated', function () {
expect($this->discoveryCacheManager)->toBeInstanceOf(DiscoveryCacheManager::class);
});
});