Files
michaelschiemer/tests/debug/manual-attribute-test.php
Michael Schiemer 5050c7d73a 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
2025-10-05 11:05:04 +02:00

65 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Application\Media\ShowImage;
use App\Framework\Attributes\Route;
echo "=== Manual Attribute Test ===\n";
try {
// Check if ShowImage class exists
if (!class_exists(ShowImage::class)) {
echo "❌ ShowImage class not found!\n";
exit(1);
}
echo "✅ ShowImage class found: " . ShowImage::class . "\n";
// Get reflection class
$reflection = new ReflectionClass(ShowImage::class);
echo "✅ Class reflection created\n";
// Check methods
$methods = $reflection->getMethods();
echo "Methods found: " . count($methods) . "\n";
foreach ($methods as $method) {
echo " Method: " . $method->getName() . "\n";
// Check for Route attributes
$attributes = $method->getAttributes(Route::class);
echo " Route attributes: " . count($attributes) . "\n";
foreach ($attributes as $attribute) {
echo " *** FOUND Route attribute! ***\n";
$routeInstance = $attribute->newInstance();
echo " Path: " . $routeInstance->path . "\n";
echo " Method: " . $routeInstance->method->value . "\n";
}
}
// Check class file location
$filename = $reflection->getFileName();
echo "File location: $filename\n";
// Check if file is in src directory
if (str_contains($filename, '/src/')) {
echo "✅ File is in src directory\n";
} else {
echo "❌ File is NOT in src directory\n";
}
// Check if it should be discovered
if (str_contains($filename, '/src/Application/')) {
echo "✅ File is in Application directory - should be discovered\n";
} else {
echo "❌ File is NOT in Application directory\n";
}
} catch (Exception $e) {
echo "❌ Error during manual test: " . $e->getMessage() . "\n";
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
}