From 8a9db9fa4b91ea00288dc6ded02488d1d89c1872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dr=C3=A1bek?= Date: Sun, 15 Feb 2026 14:34:18 +0100 Subject: [PATCH 1/2] Fix Nette Schema compatiblity --- src/DI/CaptchaExtension.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/DI/CaptchaExtension.php b/src/DI/CaptchaExtension.php index 86fdf5d..88e4259 100644 --- a/src/DI/CaptchaExtension.php +++ b/src/DI/CaptchaExtension.php @@ -12,6 +12,7 @@ use Nette\DI\CompilerExtension; use Nette\Forms\Container; use Nette\PhpGenerator\ClassType; +use Nette\Schema\Context; use Nette\Schema\Expect; use Nette\Schema\Schema; @@ -23,12 +24,12 @@ class CaptchaExtension extends CompilerExtension public function getConfigSchema(): Schema { return Expect::structure([ - 'type' => Expect::anyOf(CaptchaType::TURNSTILE->value, CaptchaType::HCAPTCHA->value)->default(CaptchaType::TURNSTILE)->transform(fn (string $value) => CaptchaType::from($value)), + 'type' => Expect::anyOf(CaptchaType::TURNSTILE->value, CaptchaType::HCAPTCHA->value)->default(CaptchaType::TURNSTILE)->transform(fn (mixed $value, Context $context): CaptchaType => $value instanceof CaptchaType ? $value : (is_string($value) ? CaptchaType::from($value) : CaptchaType::TURNSTILE)), 'secretKey' => Expect::string()->required(), 'siteKey' => Expect::string()->required(), 'verifyUrl' => Expect::string()->nullable(), - 'theme' => Expect::anyOf(Theme::LIGHT->value, Theme::DARK->value, Theme::AUTO->value)->default(Theme::AUTO)->transform(fn (string $value) => Theme::from($value)), - 'size' => Expect::anyOf(Size::NORMAL->value, Size::COMPACT->value)->default(Size::NORMAL)->transform(fn (string $value) => Size::from($value)), + 'theme' => Expect::anyOf(Theme::LIGHT->value, Theme::DARK->value, Theme::AUTO->value)->default(Theme::AUTO)->transform(fn (mixed $value, Context $context): Theme => $value instanceof Theme ? $value : (is_string($value) ? Theme::from($value) : Theme::AUTO)), + 'size' => Expect::anyOf(Size::NORMAL->value, Size::COMPACT->value)->default(Size::NORMAL)->transform(fn (mixed $value, Context $context): Size => $value instanceof Size ? $value : (is_string($value) ? Size::from($value) : Size::NORMAL)), ]); } From 7cb1b87bba4f746ce947874ed38279e115c337b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dr=C3=A1bek?= Date: Sun, 15 Feb 2026 14:34:35 +0100 Subject: [PATCH 2/2] Add CI pipeline for PHP 8.5 --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f0e9a50..6cb2e4e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.2', '8.3', '8.4'] + php-version: ['8.2', '8.3', '8.4', '8.5'] steps: - uses: actions/checkout@v3