From 9f7c9c8f3a2db0e9d508be3e1ce878156f475eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Sun, 3 Nov 2024 14:52:09 +0100 Subject: [PATCH] Performance Co-authored-by: Hugo Alliaume --- src/TwigComponent/src/ComponentAttributes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TwigComponent/src/ComponentAttributes.php b/src/TwigComponent/src/ComponentAttributes.php index 9f2a3a9dd2f..194acaba941 100644 --- a/src/TwigComponent/src/ComponentAttributes.php +++ b/src/TwigComponent/src/ComponentAttributes.php @@ -44,7 +44,8 @@ public function __toString(): string ), function (string $carry, string $key) { if ( - preg_match(self::NESTED_REGEX, $key) + str_contains($key, ':') + && preg_match(self::NESTED_REGEX, $key) && !preg_match(self::ALPINE_REGEX, $key) && !preg_match(self::VUE_REGEX, $key) ) {