Fix dependency injection.

This commit is contained in:
Pol Dellaiera 2021-05-06 12:50:15 +02:00
parent c5940c1263
commit d2a93f0763

View File

@ -34,7 +34,6 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Chill\PersonBundle\Search\SimilarPersonMatcher;
use Symfony\Component\Translation\TranslatorInterface;
use Chill\MainBundle\Search\SearchProvider;
use Chill\PersonBundle\Repository\PersonRepository;
use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper;
@ -42,6 +41,7 @@ use Chill\PersonBundle\Repository\PersonNotDuplicateRepository;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
final class PersonController extends AbstractController
{
@ -183,7 +183,7 @@ final class PersonController extends AbstractController
* path="/{_locale}/person/{person_id}/general/update"
* )
*/
public function updateAction($person_id, Request $request)
public function updateAction($person_id, Request $request, TranslatorInterface $translator)
{
$person = $this->_getPerson($person_id);
@ -212,7 +212,7 @@ final class PersonController extends AbstractController
$this->get('session')->getFlashBag()
->add('success',
$this->get('translator')
$translator
->trans('The person data has been updated')
);