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,14 +1,13 @@
<?php
declare(strict_types=1);
namespace App\Framework\View\Processors;
use App\Framework\Core\PathProvider;
use App\Framework\Template\Processing\DomProcessor;
use App\Framework\View\DomHeadService;
use App\Framework\View\DomProcessor;
use App\Framework\View\DomWrapper;
use Dom\HTMLDocument;
use DOMDocument;
use DOMElement;
use App\Framework\View\RenderContext;
final class AssetInjector implements DomProcessor
@@ -19,15 +18,15 @@ final class AssetInjector implements DomProcessor
PathProvider $pathProvider,
private DomHeadService $headService,
string $manifestPath = '',
)
{
) {
$manifestPath = $pathProvider->resolvePath('/public/.vite/manifest.json');;
$manifestPath = $pathProvider->resolvePath('/public/.vite/manifest.json');
;
#$manifestPath = dirname(__DIR__, 3) . '../public/.vite/manifest.json';
if (!is_file($manifestPath)) {
if (! is_file($manifestPath)) {
throw new \RuntimeException("Vite manifest not found: $manifestPath");
}
$json = file_get_contents($manifestPath);
@@ -47,7 +46,7 @@ final class AssetInjector implements DomProcessor
$insertParent = $head ?: $dom->document->getElementsByTagName('body')->item(0) ?: $dom->document->documentElement;
// --- CSS, wie von Vite empfohlen: Feld "css" beim js-Eintrag! ---
if (!empty($this->manifest[$jsKey]['css']) && is_array($this->manifest[$jsKey]['css'])) {
if (! empty($this->manifest[$jsKey]['css']) && is_array($this->manifest[$jsKey]['css'])) {
foreach ($this->manifest[$jsKey]['css'] as $cssFile) {
$this->headService->addStylesheet($dom, '/' . ltrim($cssFile, '/'));