Closed danaki closed 3 years ago
Hey @danaki :)
You are right, this seems weird. Let's try to get some intel first :
Well, actually I'm using seemingly abandoned https://github.com/danaki/SonataAutoConfigureBundle that I've patched so that Symfony 5 doesnt complain and that could be the source of the issue, like so:
/**
* @AdminOptions(
* label="Фидбеки",
* group="Для продуктов",
* entity=ProductFeedback::class,
* controller=Yokai\SonataWorkflow\Controller\WorkflowController::class
* )
*/
class ProductFeedbackAdmin extends AbstractAdmin
...
however I'm using SortableBehaviorBundle which also requires controller to be rewritten in the similar manner.
Anyways, creating my own empty controller and using the trait fixed the error.
However there's another issue now that deserves it's own ticket, but... The error is gone, but transition menu is missing. And it seems there's something is going to be changed in upcoming Sonata Admin API, at least I grep'ed for "configureSideMenu" in vendor/sonata-project and haven't found anything.
Not sure how the bundle works, but controller MUST be a service, it won't work otherwise.
Maybe sonata 4.x will allow different controllers in same admin, will save me lot of time :)
About your second issue, please open a new ticket, because method exists but was deprecated : https://github.com/sonata-project/SonataAdminBundle/blob/3.x/src/Admin/AdminExtensionInterface.php#L83
I'm using Symfony 5.2 and sonata-admin of the 4.x-dev branch (because 3.x requires symfony/console 4.x) and while using this bundle getting a strange error:
While digging into the issue I've found that there's actually another exception shadowed and probably wrongly rethrown in Sonata-admin's CRUD controller in configureAdmin() method:
Seems that 'sonata.admin.pool' is not public service anymore but how that could be related to Sonata-Workflow bundle? Can you help me with this?