bootstrapWeb(); echo "DEBUG: Web app bootstrapped successfully\n"; // Get container from the app $reflection = new ReflectionObject($app); $containerProperty = $reflection->getProperty('container'); $containerProperty->setAccessible(true); $container = $containerProperty->getValue($app); echo "DEBUG: Got container from app\n"; // Check if DiscoveryRegistry is available if ($container->has(DiscoveryRegistry::class)) { echo "DEBUG: DiscoveryRegistry is available in container\n"; $registry = $container->get(DiscoveryRegistry::class); $routeCount = $registry->attributes->getCount(Route::class); echo "DEBUG: Found $routeCount route attributes in registry\n"; if ($routeCount > 0) { $routes = $registry->attributes->get(Route::class); echo "DEBUG: First few routes:\n"; foreach (array_slice($routes, 0, 3) as $i => $route) { echo " Route $i: " . $route->className->getFullyQualified() . "::" . $route->methodName?->toString() . "\n"; } // Look for the home route specifically echo "DEBUG: Looking for home route (/)\n"; $homeFound = false; foreach ($routes as $route) { $instance = $route->createAttributeInstance(); if ($instance instanceof \App\Framework\Attributes\Route && $instance->path === '/') { echo " HOME ROUTE FOUND: " . $route->className->getFullyQualified() . "::" . $route->methodName?->toString() . " -> " . $instance->path . "\n"; $homeFound = true; } } if (!$homeFound) { echo " HOME ROUTE NOT FOUND in discovery results\n"; } } else { echo "DEBUG: No routes found in registry\n"; } echo "DEBUG: Total discovery items: " . count($registry) . "\n"; } else { echo "DEBUG: DiscoveryRegistry is NOT available in container\n"; } echo "DEBUG: Debug complete\n";