From 6e4db923da98889bacccfdbcecf867f341bbab64 Mon Sep 17 00:00:00 2001 From: Bastian Lederer Date: Mon, 16 Mar 2026 10:00:40 +0100 Subject: [PATCH] `FormElements::isValidEvent()`: Add strict types Add strict types for compatibility with ipl-stdlib --- composer.json | 4 ++-- src/FormElement/FormElements.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 1a293a60..1bd65802 100644 --- a/composer.json +++ b/composer.json @@ -11,14 +11,14 @@ "require": { "php": ">=8.2", "ext-fileinfo": "*", - "ipl/stdlib": ">=0.12.0", + "ipl/stdlib": "dev-modernize-code-with-breaking-changes", "ipl/validator": ">=0.5.0", "psr/http-message": "^1.1", "guzzlehttp/psr7": "^2.8" }, "require-dev": { "ext-dom": "*", - "ipl/stdlib": "dev-main", + "ipl/stdlib": "dev-modernize-code-with-breaking-changes", "ipl/validator": "dev-main" }, "autoload": { diff --git a/src/FormElement/FormElements.php b/src/FormElement/FormElements.php index 6121b762..3f0b41dd 100644 --- a/src/FormElement/FormElements.php +++ b/src/FormElement/FormElements.php @@ -536,7 +536,7 @@ protected function decorate(FormElement $element) return $this; } - public function isValidEvent($event) + public function isValidEvent(string $event): bool { return in_array($event, [ Form::ON_SUBMIT,