Repository: EasyCorp/EasyAdminBundle (language: php)

Issue:
All menu items get active state when different actions for same CrudController is in the menu
If I have multiple menu items to different CRUD actions for the same CrudController then they will all get the active state when visiting any non-index Crud links.

Simple example:

````    
public function configureMenuItems(): iterable
    {
        yield MenuItem::linkToDashboard('Dashboard', 'fa fa-home');

        yield MenuItem::subMenu('User Management', 'fa fa-users')->setSubItems([
            MenuItem::linkToCrud('View User List', 'fa fa-user', User::class)->setAction(Crud::PAGE_INDEX),
            MenuItem::linkToCrud('Create New User', 'fa fa-plus-circle', User::class)->setAction(Crud::PAGE_NEW),
        ]);
    }
````

When I'm on the User index page only the link with the PAGE_INDEX crud link is active.
![image](https://user-images.githubusercontent.com/1197834/225157152-f3269bac-a899-4088-bc65-849e11d76360.png)

But if I go to the link with the PAGE_NEW crud action then both links become active.
![image](https://user-images.githubusercontent.com/1197834/225157315-181d4315-6944-4c81-a894-7d65e03342e9.png)

I think this was an unintended side effect from the fix for issue #5543 



Discussion / hints:
Hi, i have the same issue.
There is one more issue.

When you want to link to a custom action in the crud controller an error occurs. `Call to a member function all() on array`

In the [EasyCorp\Bundle\EasyAdminBundle\Dto\ActionConfigDto](https://github.com/EasyCorp/EasyAdminBundle/blame/4.x/src/Dto/ActionConfigDto.php) there is a method `getActions` which return `ActionCollection` or `array` depending if there is or not a `pageName`

```php
    public function getActions(): ActionCollection|array
    {
        return null === $this->pageName ? $this->actions : ActionCollection::new($this->actions[$this->pageName]);
    }
```
but in [EasyCorp\Bundle\EasyAdminBundle\Factory\ActionFactory](https://github.com/EasyCorp/EasyAdminBundle/blob/4.x/src/Factory/ActionFactory.php) only `ActionCollection` is expected in `processEntityActions`

```php
public function processEntityActions(EntityDto $entityDto, ActionConfigDto $actionsDto): void
    {
        $currentPage = $this->adminContextProvider->getContext()->getCrud()->getCurrentPage();
        $entityActions = [];
        foreach ($actionsDto->getActions()->all() as $actionDto) {
            if (!$actionDto->isEntityAction()) {
                continue;
            }
```

Is there anyone explain why it is like that? Why `ActionConfigDto::getActions` return different types?

Fix patch:
diff --git a/src/Menu/MenuItemMatcher.php b/src/Menu/MenuItemMatcher.php
index dea6b2c4e9..f57b2d3500 100644
--- a/src/Menu/MenuItemMatcher.php
+++ b/src/Menu/MenuItemMatcher.php
@@ -36,8 +36,9 @@ public function isSelected(MenuItemDto $menuItemDto): bool
         }
 
         $menuItemLinksToIndexCrudAction = Crud::PAGE_INDEX === ($menuItemQueryParameters[EA::CRUD_ACTION] ?? false);
+        $currentPageLinksToIndexCrudAction = Crud::PAGE_INDEX === ($currentPageQueryParameters[EA::CRUD_ACTION] ?? false);
         $menuItemQueryParameters = $this->filterIrrelevantQueryParameters($menuItemQueryParameters, $menuItemLinksToIndexCrudAction);
-        $currentPageQueryParameters = $this->filterIrrelevantQueryParameters($currentPageQueryParameters, $menuItemLinksToIndexCrudAction);
+        $currentPageQueryParameters = $this->filterIrrelevantQueryParameters($currentPageQueryParameters, $currentPageLinksToIndexCrudAction);
 
         // needed so you can pass route parameters in any order
         sort($menuItemQueryParameters);


Test patch: