- 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.
89 lines
3.5 KiB
PHP
89 lines
3.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
use App\Framework\Attributes\Route;
|
|
use App\Framework\Core\PathProvider;
|
|
use App\Framework\DI\DefaultContainer;
|
|
use App\Framework\Discovery\DiscoveryServiceBootstrapper;
|
|
use App\Framework\Discovery\Results\DiscoveryRegistry;
|
|
|
|
echo "=== Direct Discovery Test ===\n";
|
|
|
|
try {
|
|
// Create minimal container and path provider
|
|
$container = new DefaultContainer();
|
|
$basePath = dirname(__DIR__, 2);
|
|
$pathProvider = new PathProvider($basePath);
|
|
$container->singleton(PathProvider::class, $pathProvider);
|
|
|
|
// Bootstrap discovery service
|
|
$discoveryBootstrapper = new DiscoveryServiceBootstrapper();
|
|
$discoveryBootstrapper->initialize($container);
|
|
|
|
// Get the discovery registry
|
|
$discoveryRegistry = $container->resolve(DiscoveryRegistry::class);
|
|
|
|
echo "Discovery Registry successfully loaded\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 "=== Searching for ShowImage Route ===\n";
|
|
|
|
// Search specifically for ShowImage
|
|
$showImageRoutes = array_filter($routes, function ($route) {
|
|
return str_contains($route->filePath->normalized ?? '', 'ShowImage.php');
|
|
});
|
|
|
|
echo "ShowImage routes found: " . 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";
|
|
echo " File: " . ($route->filePath->normalized ?? 'unknown') . "\n";
|
|
}
|
|
} else {
|
|
echo "❌ ShowImage route NOT found in discovery\n";
|
|
|
|
// Let's look at a few sample routes to understand the pattern
|
|
echo "\n=== Sample Routes for Debugging ===\n";
|
|
foreach (array_slice($routes, 0, 5) as $index => $route) {
|
|
echo "Route " . ($index + 1) . ":\n";
|
|
echo " File: " . ($route->filePath->normalized ?? 'unknown') . "\n";
|
|
echo " Class: " . ($route->additionalData['class'] ?? 'unknown') . "\n";
|
|
echo " Path: " . ($route->additionalData['path'] ?? 'unknown') . "\n";
|
|
echo "\n";
|
|
}
|
|
|
|
// Look for files in Application/Media directory
|
|
echo "=== Looking for files in Application/Media ===\n";
|
|
$mediaRoutes = array_filter($routes, function ($route) {
|
|
return str_contains($route->filePath->normalized ?? '', 'Application/Media');
|
|
});
|
|
echo "Routes in Application/Media: " . count($mediaRoutes) . "\n";
|
|
|
|
foreach ($mediaRoutes as $route) {
|
|
echo " File: " . ($route->filePath->normalized ?? 'unknown') . "\n";
|
|
echo " Class: " . ($route->additionalData['class'] ?? 'unknown') . "\n";
|
|
}
|
|
}
|
|
|
|
} else {
|
|
echo "❌ No routes found in discovery registry!\n";
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
echo "❌ Error during discovery test: " . $e->getMessage() . "\n";
|
|
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
|
|
}
|