#!/usr/bin/env php getAttributeClass() . PHP_EOL; echo "ConsoleCommand class: " . ConsoleCommand::class . PHP_EOL; echo "Classes match: " . ($mapper->getAttributeClass() === ConsoleCommand::class ? 'YES' : 'NO') . PHP_EOL; // Test with a real method $reflector = new ReflectionClass(DemoCommand::class); $method = $reflector->getMethod('hello'); $attributes = $method->getAttributes(ConsoleCommand::class); if (!empty($attributes)) { $attribute = $attributes[0]->newInstance(); echo "Attribute found: " . $attribute->name . PHP_EOL; // This would require complex setup, just test the basic mapping echo "Basic mapper test passed!" . PHP_EOL; } else { echo "No attributes found on hello method!" . PHP_EOL; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . PHP_EOL; echo "Trace: " . $e->getTraceAsString() . PHP_EOL; }