Files
michaelschiemer/src/Framework/LiveComponents/ComponentRegistryInitializer.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
2025-10-25 19:18:37 +02:00

59 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Framework\LiveComponents;
use App\Framework\DI\Container;
use App\Framework\DI\Initializer;
use App\Framework\Discovery\Results\DiscoveryRegistry;
use App\Framework\LiveComponents\Contracts\ComponentRegistryInterface;
use App\Framework\LiveComponents\Debug\DebugPanelRenderer;
use App\Framework\LiveComponents\Performance\ComponentMetadataCache;
use App\Framework\Performance\NestedPerformanceTracker;
use App\Framework\View\LiveComponentRenderer;
final readonly class ComponentRegistryInitializer
{
public function __construct(
private Container $container,
private DiscoveryRegistry $discoveryRegistry
) {
}
#[Initializer]
public function __invoke(): ComponentRegistryInterface
{
$renderer = $this->container->get(LiveComponentRenderer::class);
$cacheManager = $this->container->get(ComponentCacheManager::class);
$handler = $this->container->get(LiveComponentHandler::class);
$metadataCache = $this->container->get(ComponentMetadataCache::class);
$performanceTracker = $this->container->get(NestedPerformanceTracker::class);
// DebugPanel is optional
$debugPanel = null;
try {
$debugPanel = $this->container->get(DebugPanelRenderer::class);
} catch (\Throwable) {
// DebugPanel not available, that's okay
}
$registry = new ComponentRegistry(
container: $this->container,
discoveryRegistry: $this->discoveryRegistry,
renderer: $renderer,
cacheManager: $cacheManager,
handler: $handler,
metadataCache: $metadataCache,
performanceTracker: $performanceTracker,
debugPanel: $debugPanel
);
// Register as interface
$this->container->singleton(ComponentRegistryInterface::class, $registry);
return $registry;
}
}