Skip to content

Commit

Permalink
Allow nesting of Attachable annotations (#1663)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Oct 9, 2024
1 parent 1d92485 commit 3b6f380
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 3b6f380

Please sign in to comment.