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,5 +1,7 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
use App\Framework\Router\ActionResult;
@@ -11,5 +13,6 @@ final readonly class ContentNegotiationResult implements ActionResult
public ?string $redirectTo = null,
public ?string $viewTemplate = null,
public array $viewData = [],
) {}
) {
}
}

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
use App\Framework\Router\ActionResult;
@@ -10,5 +12,6 @@ final readonly class FileResult implements ActionResult
public string $filePath,
public string $variant = 'original',
public string $mimeType = 'application/image',
) {}
) {
}
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -11,5 +12,6 @@ final class JsonResult implements ActionResult
public function __construct(
public readonly array $data,
public Status $status = Status::OK,
) {}
) {
}
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -9,7 +10,9 @@ use App\Framework\Router\ActionResult;
final class Redirect implements ActionResult
{
public Status $status = Status::FOUND;
public function __construct(
public readonly string $target,
) {}
) {
}
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -19,7 +20,8 @@ final readonly class SseEvent
public ?string $event = null,
public ?string $id = null,
public ?int $retry = null
) {}
) {
}
/**
* Formatiert das Event in das SSE-Protokollformat

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -23,12 +24,11 @@ final class SseResult implements ActionResult
public readonly Status $status = Status::OK,
public readonly ?int $retryInterval = 3000,
public readonly array $headers = [],
public readonly ?Closure $callback = null,
public readonly int $maxDuration = 0,
public readonly int $heartbeatInterval = 30,
) {}
) {
}
/**
* Fügt ein Event hinzu, das beim initialen Verbindungsaufbau gesendet wird
@@ -40,6 +40,7 @@ final class SseResult implements ActionResult
?int $retry = null
): self {
$this->initialEvents[] = new SseEvent($data, $event, $id, $retry);
return $this;
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -30,7 +31,8 @@ final class SseResultWithCallback implements ActionResult
public function __construct(
public readonly Status $status = Status::OK,
public readonly array $headers = []
) {}
) {
}
/**
* Setzt die Callback-Funktion, die während des Streamings aufgerufen wird
@@ -41,6 +43,7 @@ final class SseResultWithCallback implements ActionResult
public function setCallback(callable $callback): self
{
$this->callback = $callback;
return $this;
}
@@ -52,6 +55,7 @@ final class SseResultWithCallback implements ActionResult
public function setMaxDuration(int $seconds): self
{
$this->maxDuration = $seconds;
return $this;
}
@@ -63,6 +67,7 @@ final class SseResultWithCallback implements ActionResult
public function setHeartbeatInterval(int $seconds): self
{
$this->heartbeatInterval = $seconds;
return $this;
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -18,7 +19,8 @@ final readonly class ViewResult implements ActionResult
public array $slots = [],
public ?string $controllerClass = null,
public ?object $model = null,
) {}
) {
}
/*public static function fromStrings():self
{

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Router\Result;
@@ -46,7 +47,8 @@ final class WebSocketResult implements ActionResult
public function __construct(
public readonly Status $status = Status::SWITCHING_PROTOCOLS,
public readonly array $headers = []
) {}
) {
}
/**
* Setzt den Handler für neue Verbindungen
@@ -56,6 +58,7 @@ final class WebSocketResult implements ActionResult
public function onConnect(callable $handler): self
{
$this->onConnect = $handler;
return $this;
}
@@ -67,6 +70,7 @@ final class WebSocketResult implements ActionResult
public function onMessage(callable $handler): self
{
$this->onMessage = $handler;
return $this;
}
@@ -78,6 +82,7 @@ final class WebSocketResult implements ActionResult
public function onClose(callable $handler): self
{
$this->onClose = $handler;
return $this;
}
@@ -89,6 +94,7 @@ final class WebSocketResult implements ActionResult
public function onError(callable $handler): self
{
$this->onError = $handler;
return $this;
}
@@ -98,6 +104,7 @@ final class WebSocketResult implements ActionResult
public function withSubprotocols(array $subprotocols): self
{
$this->subprotocols = $subprotocols;
return $this;
}
@@ -107,6 +114,7 @@ final class WebSocketResult implements ActionResult
public function withMaxMessageSize(int $bytes): self
{
$this->maxMessageSize = $bytes;
return $this;
}
@@ -116,15 +124,43 @@ final class WebSocketResult implements ActionResult
public function withPingInterval(int $seconds): self
{
$this->pingInterval = $seconds;
return $this;
}
// Getter
public function getOnConnect(): ?callable { return $this->onConnect; }
public function getOnMessage(): ?callable { return $this->onMessage; }
public function getOnClose(): ?callable { return $this->onClose; }
public function getOnError(): ?callable { return $this->onError; }
public function getSubprotocols(): array { return $this->subprotocols; }
public function getMaxMessageSize(): int { return $this->maxMessageSize; }
public function getPingInterval(): int { return $this->pingInterval; }
public function getOnConnect(): ?callable
{
return $this->onConnect;
}
public function getOnMessage(): ?callable
{
return $this->onMessage;
}
public function getOnClose(): ?callable
{
return $this->onClose;
}
public function getOnError(): ?callable
{
return $this->onError;
}
public function getSubprotocols(): array
{
return $this->subprotocols;
}
public function getMaxMessageSize(): int
{
return $this->maxMessageSize;
}
public function getPingInterval(): int
{
return $this->pingInterval;
}
}