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

@@ -1,54 +1,40 @@
<?php
namespace Tests\Framework\DateTime;
declare(strict_types=1);
use App\Framework\DateTime\Clock;
use App\Framework\Config\AppConfig;
use App\Framework\DateTime\ClockInitializer;
use App\Framework\DateTime\FrozenClock;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemTimer;
use App\Framework\DateTime\Timezone;
class ClockInitializerTest extends \PHPUnit\Framework\TestCase
{
public function testDefaultInitialization(): void
{
$initializer = new ClockInitializer();
$clock = $initializer();
beforeEach(function () {
$this->config = new AppConfig(
timezone: Timezone::UTC
);
$this->initializer = new ClockInitializer($this->config);
});
$this->assertInstanceOf(SystemClock::class, $clock);
$this->assertEquals('UTC', $clock->now()->getTimezone()->getName());
}
test('default initialization creates system clock with UTC', function () {
$clock = ($this->initializer)();
public function testCustomTimezone(): void
{
$initializer = new ClockInitializer('Europe/Berlin');
$clock = $initializer();
expect($clock)->toBeInstanceOf(SystemClock::class)
->and($clock->now()->getTimezone()->getName())->toBe('UTC');
});
$this->assertInstanceOf(SystemClock::class, $clock);
$this->assertEquals('Europe/Berlin', $clock->now()->getTimezone()->getName());
}
test('custom timezone in config is respected', function () {
$config = new AppConfig(
timezone: Timezone::EuropeBerlin
);
$initializer = new ClockInitializer($config);
$clock = $initializer();
public function testFrozenClockInitialization(): void
{
$initializer = new ClockInitializer(
useFrozenClock: true,
frozenTime: '2021-01-01 12:00:00'
);
$clock = $initializer();
expect($clock)->toBeInstanceOf(SystemClock::class)
->and($clock->now()->getTimezone()->getName())->toBe('Europe/Berlin');
});
$this->assertInstanceOf(FrozenClock::class, $clock);
$this->assertEquals('2021-01-01 12:00:00', $clock->now()->format('Y-m-d H:i:s'));
}
test('timer initialization works', function () {
$timer = $this->initializer->initTimer();
public function testFrozenClockWithCustomTimezone(): void
{
$initializer = new ClockInitializer(
timezone: 'Europe/Berlin',
useFrozenClock: true,
frozenTime: '2021-01-01 12:00:00'
);
$clock = $initializer();
$this->assertInstanceOf(FrozenClock::class, $clock);
$this->assertEquals('Europe/Berlin', $clock->now()->getTimezone()->getName());
}
}
expect($timer)->toBeInstanceOf(SystemTimer::class);
});