Skip to content

Commit

Permalink
minor #2139 Trigger a proper deprecaton notice when using the depreca…
Browse files Browse the repository at this point in the history
…ted route name (javiereguiluz)

This PR was merged into the 1.x branch.

Discussion
----------

Trigger a proper deprecaton notice when using the deprecated route name

We removed this in master (#2137) but it may be nice to trigger a real deprecation notice in 1.x. @grachevko what do you think? Thanks!

Commits
-------

ce77b43 Trigger a proper deprecaton notice when using the deprecated route name
  • Loading branch information
javiereguiluz committed Mar 6, 2018
2 parents 40c70e0 + ce77b43 commit 1612f22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ class AdminController extends Controller
*/
public function indexAction(Request $request)
{
if ('admin' === $request->attributes->get('_route')) {
trigger_error(sprintf('The "admin" route is deprecated since version 1.8.0 and it will be removed in 2.0. Use the "easyadmin" route instead.'), E_USER_DEPRECATED);
}

$this->initialize($request);

if (null === $request->query->get('entity')) {
Expand Down

0 comments on commit 1612f22

Please sign in to comment.