docs: consolidate documentation into organized structure

- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
This commit is contained in:
2025-10-05 11:05:04 +02:00
parent 887847dde6
commit 5050c7d73a
36686 changed files with 196456 additions and 12398919 deletions

View File

@@ -0,0 +1,138 @@
<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\Core\AppBootstrapper;
use App\Framework\Queue\Queue;
use App\Framework\Queue\ValueObjects\JobPayload;
use App\Framework\Performance\EnhancedPerformanceCollector;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemHighResolutionClock;
use App\Framework\Performance\MemoryMonitor;
echo "🔧 Testing Basic Queue Operations\n";
echo "=================================\n\n";
try {
// Bootstrap framework
$clock = new SystemClock();
$highResClock = new SystemHighResolutionClock();
$memoryMonitor = new MemoryMonitor();
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: false);
$bootstrapper = new AppBootstrapper(__DIR__ . '/../..', $collector, $memoryMonitor);
$container = $bootstrapper->bootstrapWorker();
$queue = $container->get(Queue::class);
echo "✅ Framework bootstrapped successfully\n";
echo "✅ Queue service retrieved\n\n";
// Test 1: Basic Queue Information
echo "📋 Test 1: Basic Queue Information\n";
echo "---------------------------------\n";
$queueClass = get_class($queue);
echo "📊 Queue Implementation: $queueClass\n";
$size = $queue->size();
echo "📊 Current queue size: $size\n";
$stats = $queue->getStats();
echo "📊 Queue statistics: " . json_encode($stats, JSON_PRETTY_PRINT) . "\n\n";
// Test 2: Create and Push a Simple Job
echo "📋 Test 2: Create and Push Simple Job\n";
echo "------------------------------------\n";
$simpleJob = new class {
public function handle(): string
{
$message = "Simple job executed at " . date('Y-m-d H:i:s');
echo "🎯 $message\n";
return $message;
}
public function getType(): string
{
return 'simple-test-job';
}
};
try {
$jobPayload = JobPayload::immediate($simpleJob);
echo "✅ JobPayload created successfully\n";
$queue->push($jobPayload);
echo "✅ Job pushed to queue successfully\n";
$newSize = $queue->size();
echo "📊 Queue size after push: $newSize\n";
} catch (Exception $e) {
echo "❌ Failed to push job: " . $e->getMessage() . "\n";
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
}
echo "\n";
// Test 3: Pop and Execute Job
echo "📋 Test 3: Pop and Execute Job\n";
echo "-----------------------------\n";
try {
$jobPayload = $queue->pop();
if ($jobPayload) {
echo "✅ Job popped from queue\n";
echo "📊 Job type: " . $jobPayload->job->getType() . "\n";
if (method_exists($jobPayload->job, 'handle')) {
echo "✅ Executing job...\n";
$result = $jobPayload->job->handle();
echo "✅ Job executed with result: $result\n";
} else {
echo "❌ Job doesn't have handle method\n";
}
} else {
echo "❌ No jobs in queue\n";
}
$finalSize = $queue->size();
echo "📊 Queue size after pop: $finalSize\n";
} catch (Exception $e) {
echo "❌ Failed to pop/execute job: " . $e->getMessage() . "\n";
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
}
echo "\n";
// Test 4: Queue Statistics and Methods
echo "📋 Test 4: Queue Features\n";
echo "-----------------------\n";
$reflection = new ReflectionClass($queue);
$methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
echo "📋 Available Queue Methods:\n";
foreach ($methods as $method) {
if (!$method->isConstructor() && !$method->isDestructor()) {
$params = array_map(fn($p) => $p->getType() . ' $' . $p->getName(), $method->getParameters());
echo "{$method->getName()}(" . implode(', ', $params) . ")\n";
}
}
echo "\n";
$finalStats = $queue->getStats();
echo "📊 Final Queue Statistics:\n";
echo json_encode($finalStats, JSON_PRETTY_PRINT) . "\n";
} catch (Exception $e) {
echo "❌ Basic queue test failed: " . $e->getMessage() . "\n";
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
exit(1);
}
echo "\n🎯 Basic queue operations test completed!\n";