Closed inrumi closed 6 years ago
What Symfony version do you use? I can't reproduce the issue using 3.4.4.
I have attached my demo app that I used to reproduce the issue. Could you please try it and let me know whether it works for you? It's ready to go, just run composer install
right after unpack. If it works for you, then maybe you will notice what I'm doing differently and advise me. Or feel free to provide me with some demo where the issue is present.
Thank you!
I'm using 3.4.4 aswell, I downloaded the file and tested, these are the steps to reproduce it:
I have released new version 2.3.1 which addresses this issue. Please upgrade and then change your controller as in the updated wiki (see "Symfony 3.4 and above" example there).
Particularly, you don't need to retrieve this service from the container, so the service should remain private. Instead of getting the service manually, just inject it:
public function usersAction(Request $request, DataTablesInterface $datatables): JsonResponse
Please let me know whether this helps.
the warning is gone after updating and injecting the service.
Thank you a lot!
I'm getting this deprecation warning:
Even when I mark the service as public
AppBundle\DataTables\: resource: '../../src/AppBundle/DataTables' autowire: true public: true tags: [ datatable ]