Closed franmomu closed 4 years ago
I thought it was only used here: https://github.com/sonata-project/SonataAdminBundle/blob/3.x/src/Menu/Provider/GroupMenuProvider.php#L167
And there was a check isset($item['admin']) && !empty($item['admin'])
.
You quote https://github.com/sonata-project/SonataAdminBundle/blob/59a79fbbc0165741922fb0e531cc6b645d47e7f6/src/Admin/Pool.php#L145 IMHO, the same check should be done.
@franmomu I opened https://github.com/sonata-project/SonataAdminBundle/pull/6507
Environment
Sonata packages
Symfony packages
PHP version
Subject
https://github.com/sonata-project/SonataAdminBundle/pull/6350 introduce a BC break when declaring items without an admin associated.
It throws an exception in every page:
An exception has been thrown during the rendering of a template ("Notice: Undefined index: admin").
inhttps://github.com/sonata-project/SonataAdminBundle/blob/59a79fbbc0165741922fb0e531cc6b645d47e7f6/src/Admin/Pool.php#L145
Looks like it was removed from tests:
https://github.com/sonata-project/SonataAdminBundle/pull/6350/files#diff-22868865c09d35595552692a0533888fa6750899222a4b8a616347cba6c3fcb3L181
Steps to reproduce
Declare:
Expected results
To show groups on the side bar
Actual results
An exception has been thrown during the rendering of a template ("Notice: Undefined index: admin").