From 657044e5bce72b32179f0e23f5ddaf368e2372e6 Mon Sep 17 00:00:00 2001 From: spiralbot Date: Wed, 11 Dec 2024 19:46:13 +0000 Subject: [PATCH] prepare release --- composer.json | 6 +++--- src/Context/ValueDependency.php | 2 +- src/Exception/CompileException.php | 2 +- src/Exception/RenderException.php | 2 +- src/LoaderInterface.php | 2 +- src/Processor/ContextProcessor.php | 2 +- src/ViewCache.php | 2 +- src/ViewLoader.php | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 7eb0bc03..a5c5a778 100644 --- a/composer.json +++ b/composer.json @@ -34,12 +34,12 @@ ], "require": { "php": ">=8.1", - "spiral/core": "^3.15", - "spiral/files": "^3.15", + "spiral/core": "^3.14.8", + "spiral/files": "^3.14.8", "psr/event-dispatcher": "^1.0" }, "require-dev": { - "spiral/boot": "^3.15", + "spiral/boot": "^3.14.8", "phpunit/phpunit": "^10.1", "mockery/mockery": "^1.5", "vimeo/psalm": "^5.9" diff --git a/src/Context/ValueDependency.php b/src/Context/ValueDependency.php index 67f1fc78..c1fce91f 100644 --- a/src/Context/ValueDependency.php +++ b/src/Context/ValueDependency.php @@ -16,7 +16,7 @@ final class ValueDependency implements DependencyInterface public function __construct( private readonly string $name, private readonly mixed $value, - array $variants = null + ?array $variants = null ) { $this->variants = $variants ?? [$value]; } diff --git a/src/Exception/CompileException.php b/src/Exception/CompileException.php index 18eb77b7..b735cd38 100644 --- a/src/Exception/CompileException.php +++ b/src/Exception/CompileException.php @@ -8,7 +8,7 @@ class CompileException extends EngineException { private array $userTrace = []; - public function __construct(\Throwable $previous = null) + public function __construct(?\Throwable $previous = null) { parent::__construct((string) $previous?->getMessage(), (int) ($previous?->getCode() ?? 0), $previous); diff --git a/src/Exception/RenderException.php b/src/Exception/RenderException.php index fe2e8956..36c70d9a 100644 --- a/src/Exception/RenderException.php +++ b/src/Exception/RenderException.php @@ -8,7 +8,7 @@ class RenderException extends ViewException { private array $userTrace = []; - public function __construct(\Throwable $previous = null) + public function __construct(?\Throwable $previous = null) { parent::__construct((string) $previous?->getMessage(), (int) ($previous?->getCode() ?? 0), $previous); $this->file = (string) $previous?->getFile(); diff --git a/src/LoaderInterface.php b/src/LoaderInterface.php index 1e950bbc..d6f5313b 100644 --- a/src/LoaderInterface.php +++ b/src/LoaderInterface.php @@ -43,5 +43,5 @@ public function load(string $path): ViewSource; * * @throws LoaderException */ - public function list(string $namespace = null): array; + public function list(?string $namespace = null): array; } diff --git a/src/Processor/ContextProcessor.php b/src/Processor/ContextProcessor.php index 01ed7cb3..15ae7878 100644 --- a/src/Processor/ContextProcessor.php +++ b/src/Processor/ContextProcessor.php @@ -19,7 +19,7 @@ final class ContextProcessor implements ProcessorInterface private readonly string $pattern; - public function __construct(string $pattern = null) + public function __construct(?string $pattern = null) { $this->pattern = $pattern ?? self::PATTERN; } diff --git a/src/ViewCache.php b/src/ViewCache.php index 062b75e5..409512be 100644 --- a/src/ViewCache.php +++ b/src/ViewCache.php @@ -10,7 +10,7 @@ final class ViewCache { private array $cache = []; - public function reset(ContextInterface $context = null): void + public function reset(?ContextInterface $context = null): void { if (empty($context)) { $this->cache = []; diff --git a/src/ViewLoader.php b/src/ViewLoader.php index 706af0b4..4a693e03 100644 --- a/src/ViewLoader.php +++ b/src/ViewLoader.php @@ -22,7 +22,7 @@ final class ViewLoader implements LoaderInterface public function __construct( private readonly array $namespaces, - FilesInterface $files = null, + ?FilesInterface $files = null, private readonly string $defaultNamespace = self::DEFAULT_NAMESPACE, private readonly ?EventDispatcherInterface $dispatcher = null, ) { @@ -50,7 +50,7 @@ public function getExtension(): ?string * @psalm-assert-if-true non-empty-string $filename * @psalm-assert-if-true ViewPath $parsed */ - public function exists(string $path, string &$filename = null, ViewPath &$parsed = null): bool + public function exists(string $path, ?string &$filename = null, ?ViewPath &$parsed = null): bool { if (empty($this->parser)) { throw new LoaderException('Unable to locate view source, no extension has been associated.'); @@ -92,7 +92,7 @@ public function load(string $path): ViewSource ); } - public function list(string $namespace = null): array + public function list(?string $namespace = null): array { if (empty($this->parser)) { throw new LoaderException('Unable to list view sources, no extension has been associated.');