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:
48
tests/debug/DebugInitializer.php
Normal file
48
tests/debug/DebugInitializer.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Debug;
|
||||
|
||||
use App\Framework\DI\Container;
|
||||
use App\Framework\DI\Initializer;
|
||||
|
||||
final readonly class DebugInitializer
|
||||
{
|
||||
public function __construct(
|
||||
private Container $container
|
||||
) {
|
||||
}
|
||||
|
||||
#[Initializer]
|
||||
public function debugTest(): void
|
||||
{
|
||||
echo "🎉 DEBUG: DebugInitializer wurde ausgeführt!\n";
|
||||
echo "🎯 DEBUG: Container-Typ: " . get_class($this->container) . "\n";
|
||||
|
||||
// Log to a file to prove execution
|
||||
file_put_contents(
|
||||
__DIR__ . '/initializer-execution.log',
|
||||
date('Y-m-d H:i:s') . " - DebugInitializer executed\n",
|
||||
FILE_APPEND | LOCK_EX
|
||||
);
|
||||
}
|
||||
|
||||
#[Initializer]
|
||||
public function debugService(): \stdClass
|
||||
{
|
||||
echo "🚀 DEBUG: Service-Initializer wurde aufgerufen!\n";
|
||||
|
||||
// Log to a file to prove execution
|
||||
file_put_contents(
|
||||
__DIR__ . '/initializer-execution.log',
|
||||
date('Y-m-d H:i:s') . " - Service-Initializer executed\n",
|
||||
FILE_APPEND | LOCK_EX
|
||||
);
|
||||
|
||||
$service = new \stdClass();
|
||||
$service->debug = 'Created by DebugInitializer';
|
||||
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user