diff --git a/UPGRADE.md b/UPGRADE.md index ed10dae626..675631ba26 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,6 +1,20 @@ Upgrade between EasyAdmin 4.x versions ====================================== +EasyAdmin 4.11.0 +---------------- + +### Updated the `MenuItemMatcherInterface` + +The `MenuItemMatcherInterface` has changed as follows: + + * The `isSelected(MenuItemDto $menuItemDto)` has been removed + * The `isExpanded(MenuItemDto $menuItemDto)` method has been added + * A new `markSelectedMenuItem(array $menuItems)` method has been added + +Read the comments in the code of the `MenuItemMatcher` class to learn about the +new menu item matching logic. + EasyAdmin 4.10.0 ---------------- diff --git a/src/Contracts/Menu/MenuItemMatcherInterface.php b/src/Contracts/Menu/MenuItemMatcherInterface.php index 203e4e0899..99f89f5051 100644 --- a/src/Contracts/Menu/MenuItemMatcherInterface.php +++ b/src/Contracts/Menu/MenuItemMatcherInterface.php @@ -10,12 +10,8 @@ interface MenuItemMatcherInterface { /** - * @return bool Returns true when this menu item is the selected one + * @param MenuItemDto[] $menuItems + * @return MenuItemDto[] */ - public function isSelected(MenuItemDto $menuItemDto): bool; - - /** - * @return bool Returns true when any of the subitems of the menu item is selected - */ - public function isExpanded(MenuItemDto $menuItemDto): bool; + public function markSelectedMenuItem(array $menuItems): array; }