EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Custom actions route - error in documentation

Open krowek opened this issue 3 months ago • 1 comments

Describe the bug In docs there is invalid example of using custom action route. AdminRoute attribute does not exists. $context->getEntity() is without proper route attribute.

Currently in docs I see:

use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminRoute;

#[AdminRoute(path: '/invoice', name: 'view_invoice')]

and should be:

use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminAction;

#[AdminAction(routePath: '/invoice', routeName: 'view_invoice')]

https://symfony.com/bundles/EasyAdminBundle/current/actions.html#adding-custom-actions

krowek avatar Oct 23 '25 18:10 krowek

AdminRoute was introduced in 4.25.0, and replaced the AdminAction and AdminDashboard attributes.

fracsi avatar Oct 23 '25 19:10 fracsi