Files
michaelschiemer/src/Application/Admin/ShowDiscovery.php
Michael Schiemer 55a330b223 Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
2025-08-11 20:13:26 +02:00

40 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Application\Admin;
use App\Framework\Attributes\Route;
use App\Framework\Auth\Auth;
use App\Framework\Cache\Cache;
use App\Framework\Discovery\Results\DiscoveryRegistry;
class ShowDiscovery
{
public function __construct(
private DiscoveryRegistry $results,
) {
}
#[Auth]
#[Route('/admin/discovery')]
public function show(
#Cache $cache
): void {
$attributeTypes = $this->results->attributes()->getAllTypes();
foreach ($attributeTypes as $attributeType) {
echo "Attribute: $attributeType <br/>";
echo "<ul>";
$attributeMappings = $this->results->attributes()->get($attributeType);
foreach ($attributeMappings as $attributeMapping) {
$className = $attributeMapping->class->getFullyQualified();
$methodName = $attributeMapping->method?->toString() ?? '';
echo "<li>" . $className . '::' . $methodName . '()</li>';
}
echo "</ul>";
}
}
}