Skip to content

Commit

Permalink
Allow nesting of Attachable annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann committed Oct 9, 2024
1 parent 1d92485 commit b9df6a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Analysers/AttributeAnnotationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ public function build(\Reflector $reflector, Context $context): array
}
}

// Property can be nested...
return $annotation->getRoot() != $possibleParent->getRoot()
&& ($explicitParent || ($isAttachable && $isParentAllowed));
// Attachables can always be nested (unless explicitly restricted)
return ($isAttachable && $isParentAllowed)
|| ($annotation->getRoot() != $possibleParent->getRoot() && $explicitParent);
};

$annotationsWithoutParent = [];
Expand Down

0 comments on commit b9df6a2

Please sign in to comment.