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:
@@ -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 = [],
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user