Skip to content

Commit 5d4e59c

Browse files
committed
Fix deprecation message coming from AdminUrlGenerator
1 parent e8210bc commit 5d4e59c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/Router/AdminUrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function set(string $paramName, $paramValue): self
8989
'easycorp/easyadmin-bundle',
9090
'4.5.0',
9191
'Using the "%s" query parameter is deprecated. Menu items are now highlighted automatically based on the Request data, so you don\'t have to deal with menu items manually anymore.',
92-
'$paramName'
92+
$paramName,
9393
);
9494
}
9595

tests/Router/AdminUrlGeneratorTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,16 @@ public function testLegacyParameters()
193193
$this->assertSame(3, $adminUrlGenerator->get(EA::MENU_INDEX));
194194
}
195195

196+
/**
197+
* @group legacy
198+
*/
199+
public function testDeprecatedParameterMessage()
200+
{
201+
$adminUrlGenerator = $this->getAdminUrlGenerator();
202+
$this->expectDeprecation('Since easycorp/easyadmin-bundle 4.5.0: Using the "menuIndex" query parameter is deprecated. Menu items are now highlighted automatically based on the Request data, so you don\'t have to deal with menu items manually anymore.');
203+
$adminUrlGenerator->set('menuIndex', 1);
204+
}
205+
196206
public function testIncludeReferrer()
197207
{
198208
$adminUrlGenerator = $this->getAdminUrlGenerator();

0 commit comments

Comments
 (0)