getPath() . "\n"; // Test ClassExtractor $classExtractor = new ClassExtractor($fileSystemService); $classNames = $classExtractor->extractFromFile($file); echo "Classes extracted: " . count($classNames) . "\n"; foreach ($classNames as $className) { echo " - " . $className->getFullyQualified() . "\n"; } // Test FileContext creation (like FileStreamProcessor does) $fileContext = FileContext::fromFile($file)->withClassNames($classNames); // Test ProcessingContext $reflectionProvider = new CachedReflectionProvider(); $processingContext = new ProcessingContext($reflectionProvider); echo "FileContext created\n"; echo "FileContext class names: " . count($fileContext->getClassNames()) . "\n"; foreach ($fileContext->getClassNames() as $className) { echo " - " . $className->getFullyQualified() . "\n"; // Test reflection $reflection = $processingContext->getReflection($className); if ($reflection === null) { echo " ERROR: No reflection found for class\n"; } else { echo " Reflection OK: " . $reflection->getName() . "\n"; // Check methods $methods = $reflection->getMethods(); echo " Methods: " . count($methods) . "\n"; foreach ($methods as $method) { $attributes = $method->getAttributes(); if (count($attributes) > 0) { echo " Method {$method->getName()} has " . count($attributes) . " attributes:\n"; foreach ($attributes as $attr) { echo " - " . $attr->getName() . "\n"; if ($attr->getName() === 'App\\Framework\\Console\\ConsoleCommand') { echo " FOUND CONSOLE COMMAND ATTRIBUTE!\n"; } } } } } } } catch (\Throwable $e) { echo "ERROR: " . $e->getMessage() . "\n"; echo "File: " . $e->getFile() . ":" . $e->getLine() . "\n"; echo "Trace:\n" . $e->getTraceAsString() . "\n"; }