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
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -1,37 +1,39 @@
<?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\DiscoveryResults;
use App\Framework\View\TemplateDiscoveryVisitor;
use App\Framework\Discovery\Results\DiscoveryRegistry;
class ShowDiscovery
{
public function __construct(
private DiscoveryResults $results,
)
{
private DiscoveryRegistry $results,
) {
}
#[Auth]
#[Route('/admin/discovery')]
public function show(
#Cache $cache
)
{
$attributes = $this->results->getAllAttributeResults();
): void {
$attributeTypes = $this->results->attributes()->getAllTypes();
foreach ($attributes as $name => $attribute) {
echo "Attribute: $name <br/>";
foreach ($attributeTypes as $attributeType) {
echo "Attribute: $attributeType <br/>";
echo "<ul>";
foreach ($attribute as $result) {
echo "<li>" . $result['class'] . '::'.($result['method'] ?? '').'()</li>';
};
$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>";
};
}
}
}