Files
michaelschiemer/scripts/debug/minimal-bootstrap.php
Michael Schiemer 887847dde6 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)
2025-10-05 10:59:15 +02:00

53 lines
1.8 KiB
PHP

<?php
declare(strict_types=1);
/**
* Minimal framework test without discovery system
*/
ini_set('display_errors', '1');
error_reporting(E_ALL);
require __DIR__ . '/../vendor/autoload.php';
try {
echo "🌐 Minimal Framework Test\n";
echo "========================\n\n";
// Test basic framework components without discovery
$pathProvider = new App\Framework\Core\PathProvider(__DIR__ . '/..');
$clock = new App\Framework\DateTime\SystemClock();
$memoryMonitor = new App\Framework\Performance\MemoryMonitor();
echo "✅ PathProvider: " . $pathProvider->getBasePath() . "\n";
echo "✅ Clock: " . $clock->now()->format('Y-m-d H:i:s') . "\n";
echo "✅ Memory: " . number_format(memory_get_usage(true) / 1024 / 1024, 2) . " MB\n";
// Test HTTP Request parsing
$method = App\Framework\Http\Method::GET;
echo "✅ HTTP Method: " . $method->value . "\n";
// Simple HTTP response
header('Content-Type: text/html; charset=utf-8');
echo "\n📦 Framework Status:\n";
echo " • Basic components: ✅ Working\n";
echo " • Discovery system: 🚧 Needs optimization\n";
echo " • Performance: ⚡ {$memoryMonitor->getPeakMemoryUsageMb()}MB peak\n";
echo "\n🎯 Next Steps:\n";
echo " 1. Optimize discovery system for large codebase\n";
echo " 2. Implement lazy loading for Framework components\n";
echo " 3. Add performance monitoring\n";
echo " 4. Test with production cache settings\n";
} catch (Throwable $e) {
echo "❌ ERROR: " . $e->getMessage() . "\n";
echo " File: " . $e->getFile() . ":" . $e->getLine() . "\n";
echo " Class: " . get_class($e) . "\n";
if (method_exists($e, 'getContext')) {
echo " Context: " . json_encode($e->getContext()) . "\n";
}
}