Files
michaelschiemer/public/index.php
Michael Schiemer 55a330b223 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
2025-08-11 20:13:26 +02:00

57 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
use App\Framework\Performance\EnhancedPerformanceCollector;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemHighResolutionClock;
use App\Framework\Core\AppBootstrapper;
use App\Framework\Performance\MemoryMonitor;
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../src/Framework/Debug/helpers.php';
// Fehleranzeige für die Entwicklung aktivieren
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
spl_autoload_register(function($class) {
if (empty($class)) {
error_log('Empty class name detected in autoloader. Stack trace: ' .
json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10)));
return false; // Don't throw, just log and continue
}
return false;
}, true, true);
register_shutdown_function(function() {
$error = error_get_last();
if ($error !== null) {
echo "SHUTDOWN ERROR: " . print_r($error, true);
}
});
// Konfiguration
$config = [
'debug' => true,
'async_discovery' => true,
// weitere Konfigurationsoptionen...
];
// Anwendung initialisieren und ausführen
$basePath = dirname(__DIR__);
// Create dependencies for enhanced performance collector
$clock = new SystemClock();
$highResClock = new SystemHighResolutionClock();
$memoryMonitor = new MemoryMonitor();
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: true);
$bootstrapper = new AppBootstrapper($basePath, $collector, $memoryMonitor);
$app = $bootstrapper->bootstrapWeb();
// Anwendung ausführen
$app->run();
exit;