getType()->value . "\n\n"; $container = new DefaultContainer(); $pathProvider = new PathProvider($projectRoot); $clock = new SystemClock(); // Create cache for discovery $cacheDriver = new InMemoryCache(); $serializer = new JsonSerializer(); $cache = new GeneralCache($cacheDriver, $serializer); // Register required dependencies $container->instance(PathProvider::class, $pathProvider); $container->instance(\App\Framework\Cache\CacheDriver::class, $cacheDriver); $container->instance(\App\Framework\Serializer\Serializer::class, $serializer); $container->instance(\App\Framework\Cache\Cache::class, $cache); $container->instance(\App\Framework\DateTime\Clock::class, $clock); $container->instance(\App\Framework\Reflection\ReflectionProvider::class, new CachedReflectionProvider()); // Create bootstrapper $bootstrapper = new DiscoveryServiceBootstrapper($container, $clock); echo "Starting web bootstrap process...\n"; // This should discover AND execute initializers for web context $registry = $bootstrapper->bootstrap(); echo "\nWeb Bootstrap completed!\n\n"; // Check what initializers were found $initializerAttributeClass = 'App\\Framework\\DI\\Initializer'; $initializers = $registry->attributes->get($initializerAttributeClass); echo "=== Web Context Initializer Results ===\n"; echo "Initializers found: " . count($initializers) . "\n\n"; // Check if web-specific services are available $webServices = [ 'App\\Framework\\Http\\MiddlewareManagerInterface', 'App\\Framework\\Http\\Session\\SessionManager', 'App\\Framework\\Security\\RequestSigning\\RequestSigning', 'App\\Framework\\Waf\\WafEngine', 'App\\Framework\\Http\\RequestFactory', ]; echo "=== Web-Specific Services ===\n"; foreach ($webServices as $service) { $exists = $container->has($service); echo "- $service: " . ($exists ? "✅ Available" : "❌ Missing") . "\n"; } echo "\n=== Core Services ===\n"; $coreServices = [ 'App\\Framework\\Cache\\Cache', 'App\\Framework\\Logging\\Logger', 'App\\Framework\\Database\\EntityManager', ]; foreach ($coreServices as $service) { $exists = $container->has($service); echo "- $service: " . ($exists ? "✅ Available" : "❌ Missing") . "\n"; } } catch (Exception $e) { echo "❌ Error: " . $e->getMessage() . "\n"; echo "Stack trace:\n" . $e->getTraceAsString() . "\n"; }