Skip to content

Commit 8cea287

Browse files
committedNov 26, 2024·
minor #6577 Fix AdminDashboard attribute routes type (JorickPepin)
This PR was merged into the 4.x branch. Discussion ---------- Fix `AdminDashboard` attribute routes type The following configuration, which seems valid according to [the doc](https://symfony.com/bundles/EasyAdminBundle/4.x/crud.html#crud-routes), does not pass type validation (`Array does not have offset 'routeName'`): ```PHP #[AdminDashboard([ 'new' => ['routePath' => 'creer'], 'edit' => ['routePath' => '{entityId}/modifier'], 'delete' => ['routePath' => '{entityId}/supprimer'], ])] class DashboardController extends AbstractDashboardController ``` Commits ------- cd18514 Fix `AdminDashboard` attribute routes type
2 parents cc2540a + cd18514 commit 8cea287

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/Attribute/AdminDashboard.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class AdminDashboard
1010
{
1111
public function __construct(
12-
/** @var array<string, array{routeName: string, routePath: string}>|null */
12+
/** @var array<string, array{routeName?: string, routePath?: string}>|null */
1313
public ?array $routes = null,
1414
/** @var class-string[]|null $allowedControllers If defined, only these CRUD controllers will have a route defined for them */
1515
public ?array $allowedControllers = null,

0 commit comments

Comments
 (0)
Please sign in to comment.