1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Use FQCN as service name for helper services

This commit is contained in:
Yassine Guedidi 2022-04-24 17:48:59 +02:00
parent 7227d55913
commit 844e8e9d22
16 changed files with 103 additions and 85 deletions

View file

@ -6,6 +6,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Wallabag\CoreBundle\Entity\SiteCredential;
use Wallabag\CoreBundle\Helper\CryptoProxy;
use Wallabag\UserBundle\Entity\User;
/**
@ -48,8 +49,8 @@ class SiteCredentialController extends Controller
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$credential->setUsername($this->get('wallabag_core.helper.crypto_proxy')->crypt($credential->getUsername()));
$credential->setPassword($this->get('wallabag_core.helper.crypto_proxy')->crypt($credential->getPassword()));
$credential->setUsername($this->get(CryptoProxy::class)->crypt($credential->getUsername()));
$credential->setPassword($this->get(CryptoProxy::class)->crypt($credential->getPassword()));
$em = $this->getDoctrine()->getManager();
$em->persist($credential);
@ -87,8 +88,8 @@ class SiteCredentialController extends Controller
$editForm->handleRequest($request);
if ($editForm->isSubmitted() && $editForm->isValid()) {
$siteCredential->setUsername($this->get('wallabag_core.helper.crypto_proxy')->crypt($siteCredential->getUsername()));
$siteCredential->setPassword($this->get('wallabag_core.helper.crypto_proxy')->crypt($siteCredential->getPassword()));
$siteCredential->setUsername($this->get(CryptoProxy::class)->crypt($siteCredential->getUsername()));
$siteCredential->setPassword($this->get(CryptoProxy::class)->crypt($siteCredential->getPassword()));
$em = $this->getDoctrine()->getManager();
$em->persist($siteCredential);