Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
90 lines
3.1 KiB
PHP
90 lines
3.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
use App\Framework\Core\ValueObjects\ClassName;
|
|
use App\Framework\ReflectionLegacy\CachedReflectionProvider;
|
|
|
|
echo "=== Debug VisitClass Method ===" . PHP_EOL;
|
|
|
|
// Test the specific class
|
|
$className = ClassName::create('App\\Framework\\Mcp\\Console\\McpServerCommand');
|
|
echo "Testing class: " . $className->getFullyQualified() . PHP_EOL;
|
|
|
|
// Test if class exists
|
|
if (! $className->exists()) {
|
|
echo "❌ Class does not exist!" . PHP_EOL;
|
|
exit(1);
|
|
}
|
|
|
|
echo "✅ Class exists" . PHP_EOL;
|
|
|
|
// Test reflection provider
|
|
$reflectionProvider = new CachedReflectionProvider();
|
|
|
|
try {
|
|
$reflection = $reflectionProvider->getClass($className);
|
|
echo "✅ Reflection successful" . PHP_EOL;
|
|
echo "Class name: " . $reflection->getName() . PHP_EOL;
|
|
|
|
// Check methods
|
|
$methods = $reflection->getMethods();
|
|
echo "Methods found: " . count($methods) . PHP_EOL;
|
|
|
|
foreach ($methods as $method) {
|
|
echo " Method: " . $method->getName() . PHP_EOL;
|
|
|
|
$attributes = $method->getAttributes();
|
|
echo " Attributes: " . count($attributes) . PHP_EOL;
|
|
|
|
foreach ($attributes as $attribute) {
|
|
echo " - " . $attribute->getName() . PHP_EOL;
|
|
|
|
// Try to create instance
|
|
try {
|
|
$instance = $attribute->newInstance();
|
|
if ($instance instanceof App\Framework\Console\ConsoleCommand) {
|
|
echo " ✅ ConsoleCommand instance created!" . PHP_EOL;
|
|
echo " Name: " . $instance->name . PHP_EOL;
|
|
echo " Description: " . $instance->description . PHP_EOL;
|
|
} else {
|
|
echo " - Not a ConsoleCommand: " . get_class($instance) . PHP_EOL;
|
|
}
|
|
} catch (Exception $e) {
|
|
echo " ❌ Error creating instance: " . $e->getMessage() . PHP_EOL;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Now let's see what happens with the ConsoleCommandMapper
|
|
$mapper = new App\Framework\Console\ConsoleCommandMapper();
|
|
echo "✅ ConsoleCommandMapper created" . PHP_EOL;
|
|
echo "Target attribute class: " . $mapper->getAttributeClass() . PHP_EOL;
|
|
|
|
// Test mapping for each method
|
|
foreach ($methods as $method) {
|
|
$attributes = $method->getAttributes();
|
|
foreach ($attributes as $attribute) {
|
|
if ($attribute->getName() === $mapper->getAttributeClass()) {
|
|
echo "Found matching attribute on method: " . $method->getName() . PHP_EOL;
|
|
|
|
$instance = $attribute->newInstance();
|
|
$mapped = $mapper->map($method, $instance);
|
|
|
|
if ($mapped) {
|
|
echo "✅ Mapping successful:" . PHP_EOL;
|
|
echo " " . json_encode($mapped, JSON_PRETTY_PRINT) . PHP_EOL;
|
|
} else {
|
|
echo "❌ Mapping returned null" . PHP_EOL;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
echo "❌ Error: " . $e->getMessage() . PHP_EOL;
|
|
echo "Stack trace: " . $e->getTraceAsString() . PHP_EOL;
|
|
}
|