Files
michaelschiemer/tests/debug/test-showimage-discovery.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

87 lines
3.3 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\Attributes\Route;
use App\Framework\Core\AppBootstrapper;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemHighResolutionClock;
use App\Framework\Discovery\Results\DiscoveryRegistry;
use App\Framework\Performance\EnhancedPerformanceCollector;
use App\Framework\Performance\MemoryMonitor;
// Bootstrap the application to get discovery results
$basePath = dirname(__DIR__, 2);
$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();
$container = $app->getContainer();
try {
// Get the discovery registry
$discoveryRegistry = $container->resolve(DiscoveryRegistry::class);
echo "=== Discovery Registry Analysis ===\n";
// Check total Route attributes discovered
$routeCount = $discoveryRegistry->attributes->getCount(Route::class);
echo "Total Route attributes found: $routeCount\n\n";
if ($routeCount > 0) {
$routes = $discoveryRegistry->attributes->get(Route::class);
echo "=== Route Details ===\n";
foreach ($routes as $index => $discoveredRoute) {
$filePath = $discoveredRoute->filePath->normalized ?? 'unknown';
$className = $discoveredRoute->additionalData['class'] ?? 'unknown';
$method = $discoveredRoute->additionalData['method'] ?? 'unknown';
$path = $discoveredRoute->additionalData['path'] ?? 'unknown';
$httpMethod = $discoveredRoute->additionalData['http_method'] ?? 'unknown';
echo sprintf("Route %d:\n", $index + 1);
echo " File: $filePath\n";
echo " Class: $className\n";
echo " Method: $method\n";
echo " Path: $path\n";
echo " HTTP Method: $httpMethod\n";
// Check if this is the ShowImage route
if (str_contains($filePath, 'ShowImage.php')) {
echo " *** THIS IS THE SHOWIMAGE ROUTE ***\n";
}
echo "\n";
}
// Search specifically for ShowImage
$showImageRoutes = array_filter($routes, function ($route) {
return str_contains($route->filePath->normalized ?? '', 'ShowImage.php');
});
echo "=== ShowImage Routes Found ===\n";
echo "Count: " . count($showImageRoutes) . "\n";
if (count($showImageRoutes) > 0) {
foreach ($showImageRoutes as $route) {
echo "Found ShowImage route:\n";
echo " Path: " . ($route->additionalData['path'] ?? 'unknown') . "\n";
echo " Method: " . ($route->additionalData['http_method'] ?? 'unknown') . "\n";
echo " Class: " . ($route->additionalData['class'] ?? 'unknown') . "\n";
}
} else {
echo "No ShowImage routes found in discovery!\n";
}
} else {
echo "No routes found in discovery registry!\n";
}
} catch (Exception $e) {
echo "Error during discovery analysis: " . $e->getMessage() . "\n";
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
}