discover(); echo "5. Discovery completed!\n"; echo " Total items found: " . count($registry) . "\n"; echo " Attributes: " . count($registry->attributes) . "\n"; // Get ConsoleCommand attributes specifically if ($registry->attributes->has(ConsoleCommand::class)) { $consoleCommands = $registry->attributes->get(ConsoleCommand::class); echo " ConsoleCommands found: " . count($consoleCommands) . "\n\n"; echo "=== FOUND CONSOLE COMMANDS ===\n"; foreach ($consoleCommands as $i => $command) { echo ($i + 1) . ". Class: " . ($command['class'] ?? 'unknown') . "\n"; echo " Name: " . ($command['attribute']->name ?? 'unknown') . "\n"; echo " Description: " . ($command['attribute']->description ?? 'none') . "\n\n"; } } else { echo " NO ConsoleCommand attributes found!\n"; } echo "\n=== MEMORY STATS ===\n"; $memStats = $registry->getMemoryStats(); echo "Total estimated bytes: " . $memStats['total_estimated_bytes'] . "\n"; echo "Attributes count: " . count($registry->attributes) . "\n"; } catch (Throwable $e) { echo "ERROR: " . $e->getMessage() . "\n"; echo "File: " . $e->getFile() . ":" . $e->getLine() . "\n"; echo "Trace:\n" . $e->getTraceAsString() . "\n"; }