- Move 45 debug/test files from root to organized scripts/ directories - Secure public/ directory by removing debug files (security improvement) - Create structured scripts organization: • scripts/debug/ (20 files) - Framework debugging tools • scripts/test/ (18 files) - Test and validation scripts • scripts/maintenance/ (5 files) - Maintenance utilities • scripts/dev/ (2 files) - Development tools Security improvements: - Removed all debug/test files from public/ directory - Only production files remain: index.php, health.php Root directory cleanup: - Reduced from 47 to 2 PHP files in root - Only essential production files: console.php, worker.php This improves: ✅ Security (no debug code in public/) ✅ Organization (clear separation of concerns) ✅ Maintainability (easy to find and manage scripts) ✅ Professional structure (clean root directory)
57 lines
2.0 KiB
PHP
57 lines
2.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
use App\Framework\Core\AppBootstrapper;
|
|
use App\Framework\Performance\EnhancedPerformanceCollector;
|
|
use App\Framework\DateTime\SystemClock;
|
|
use App\Framework\DateTime\SystemHighResolutionClock;
|
|
use App\Framework\Performance\MemoryMonitor;
|
|
|
|
echo "Testing Queue Initializer Discovery...\n\n";
|
|
|
|
try {
|
|
// Create dependencies for enhanced performance collector
|
|
$clock = new SystemClock();
|
|
$highResClock = new SystemHighResolutionClock();
|
|
$memoryMonitor = new MemoryMonitor();
|
|
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: false);
|
|
|
|
// Bootstrap the framework
|
|
$bootstrapper = new AppBootstrapper(__DIR__, $collector, $memoryMonitor);
|
|
$container = $bootstrapper->bootstrapWorker();
|
|
|
|
echo "Framework bootstrapped successfully.\n";
|
|
|
|
// Check if Queue services are available
|
|
$services = [
|
|
'App\Framework\Queue\Interfaces\DistributedLockInterface',
|
|
'App\Framework\Queue\Services\WorkerRegistry',
|
|
'App\Framework\Queue\Services\JobDistributionService',
|
|
'App\Framework\Queue\Services\WorkerHealthCheckService',
|
|
'App\Framework\Queue\Services\FailoverRecoveryService',
|
|
'App\Framework\Queue\Contracts\JobProgressTrackerInterface',
|
|
'App\Framework\Queue\Contracts\DeadLetterQueueInterface',
|
|
'App\Framework\Queue\Services\JobMetricsManagerInterface',
|
|
'App\Framework\Queue\Contracts\JobDependencyManagerInterface'
|
|
];
|
|
|
|
echo "\nChecking Queue service registrations:\n";
|
|
echo str_repeat("=", 50) . "\n";
|
|
|
|
foreach ($services as $service) {
|
|
if ($container->has($service)) {
|
|
echo "✅ {$service} - REGISTERED\n";
|
|
} else {
|
|
echo "❌ {$service} - NOT REGISTERED\n";
|
|
}
|
|
}
|
|
|
|
echo "\nTotal container bindings: " . count($container->getBindings()) . "\n";
|
|
|
|
} catch (Throwable $e) {
|
|
echo "Error: " . $e->getMessage() . "\n";
|
|
echo "File: " . $e->getFile() . ":" . $e->getLine() . "\n";
|
|
} |