omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
255 stars 114 forks source link

Cannot AutoWire Service ...\Twig\DataTablesExtension... #122

Closed mzimhle closed 4 years ago

mzimhle commented 4 years ago

When I try to run the command:

composer require omines/datatables-bunde

I get the following error:

Cannot autowire service "Omines\DataTablesBundle\Twig\DataTablesExtension": argument "$translator" of method "__construct()" has type "Symfony\Contracts\Translation\TranslatorInterface" !! but this class was not found.

Its a clean installation as in I have the most minimum things in my application, I tried to install "composer require symfony/translation" , that still did not help, please assist.

Regards,

curry684 commented 4 years ago

If it's really minimal you likely missed the contracts. composer req symfony/contracts should fix it.

This is also a bug on our end as we should explicitly depend on it. Will fix.

curry684 commented 4 years ago

Uhm no it's not a bug - we depend on symfony/translation because of the Twig extension so the contracts must already be there.

What version were you installing?

curry684 commented 4 years ago

Closing this as, given the information provided right now, it's not an issue with the bundle.