refactor: reorganize project structure for better maintainability

- 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)
This commit is contained in:
2025-10-05 10:59:15 +02:00
parent 03e5188644
commit 887847dde6
77 changed files with 3902 additions and 787 deletions

View File

@@ -0,0 +1,34 @@
<?php
require __DIR__ . '/vendor/autoload.php';
use App\Framework\Core\Application;
use App\Framework\View\TemplateRenderer;
try {
$app = new Application();
$container = $app->getContainer();
$templateRenderer = $container->get(TemplateRenderer::class);
echo "TemplateRenderer class: " . get_class($templateRenderer) . "\n";
echo "TemplateRenderer instance of TemplateRenderer: " . ($templateRenderer instanceof TemplateRenderer ? 'YES' : 'NO') . "\n";
if (method_exists($templateRenderer, 'render')) {
echo "Has render method: YES\n";
} else {
echo "Has render method: NO\n";
}
// Check if it's the Engine class we expect
if (get_class($templateRenderer) === 'App\Framework\View\Engine') {
echo "Is Engine class: YES\n";
} else {
echo "Is Engine class: NO\n";
echo "Actual class: " . get_class($templateRenderer) . "\n";
}
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
echo "Trace: " . $e->getTraceAsString() . "\n";
}