Open nilov opened 3 years ago
@nilov Did you find a solution for this problem?
The easiest way is to copy the controller to app scope and replace all dependencies with recent ones.
And then:
App\Controller\Admin\SortableAdminController:
arguments:
$positionHandler: '@pix_sortable_behavior.position'
tags:
- controller.service_subscriber
Sonata admin officially migrated to runroom-packages/sortable-behavior-bundle
, try it instead.
https://symfony.com/bundles/SonataAdminBundle/current/cookbook/recipe_sortable_listing.html
Service "pix_sortable_behavior.position.orm" not found: even though it exists in the app's container, the container inside "Pix\SortableBehaviorBundle\Controller\SortableAdminController" is a smaller service locator that only knows about the "doctrine", "form.factory", "http_kernel", "logger", "parameter_bag", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "serializer", "session", "sonata.admin.audit.manager", "sonata.admin.object.manipulator.acl.admin", "sonata.admin.pool", "sonata.admin.request.fetcher", "translator" and "twig" services. Try using dependency injection instead.