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) {