You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Autowire problem since 1.2 because of $translator #945
You can add a constructor to your UserDatatable class , If you insist on creating the service that's okay but with the default configuration a service is created automatically (Symfony 4)
use Symfony\Contracts\Translation\TranslatorInterface;
public function __construct(
AuthorizationCheckerInterface $authorizationChecker,
TokenStorageInterface $securityToken,
TranslatorInterface $translator,
RouterInterface $router,
EntityManagerInterface $em,
Environment $twig
)
{
parent::__construct($authorizationChecker, $securityToken, $translator, $router, $em, $twig);
}
Activity
DetaX commentedon Sep 16, 2020
Translator has been typed object in DatatableFactory for legacy purposes.
You can pass the translator in your config as such :
ahmedrabii commentedon Apr 25, 2021
You can add a constructor to your UserDatatable class , If you insist on creating the service that's okay but with the default configuration a service is created automatically (Symfony 4)
To check if your service exists
php bin/console debug:container App\Datatables\UserDatatable