From 0e27f52848f73871db643bb4cc0bbc71623d0a9c Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 3 Sep 2024 21:34:01 +0200 Subject: [PATCH] Bugfix: ##any allows a nullable namespace, ##other doesn't --- src/ExtendableAttributesTrait.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ExtendableAttributesTrait.php b/src/ExtendableAttributesTrait.php index 9e24175..644cc6e 100644 --- a/src/ExtendableAttributesTrait.php +++ b/src/ExtendableAttributesTrait.php @@ -218,10 +218,10 @@ function (Attribute $attr) { ), ); } else { - // All attributes must be namespaced, ergo non-null - Assert::allNotNull($actual_namespaces); - if ($namespace === NS::OTHER) { + // All attributes must be namespaced, ergo non-null + Assert::allNotNull($actual_namespaces); + // Must be any namespace other than the parent element Assert::allNotSame($actual_namespaces, static::NS); } elseif ($namespace === NS::TARGET) {