From 7ee7ba1f0be01821d264636c4bce8a6030cf56bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez?= Date: Tue, 11 Jan 2022 13:27:16 +0100 Subject: [PATCH] dump-autoload --- .drone.yml | 2 +- backend/src/Controller/PregController.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index e41bdf4..8ed54ef 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ steps: - name: backend image: composer:2.1.14 commands: - - cd backend && composer install + - cd backend && composer install && composer dump-autoload --classmap-authoritative - name: frontend image: node:16.13.1-alpine diff --git a/backend/src/Controller/PregController.php b/backend/src/Controller/PregController.php index 10983d0..605f485 100644 --- a/backend/src/Controller/PregController.php +++ b/backend/src/Controller/PregController.php @@ -7,6 +7,7 @@ namespace App\Controller; use App\Entity\PregDTO; use App\Service\Preg; use Exception; +use Redis; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -24,7 +25,7 @@ class PregController extends AbstractController private const STORE_TTL = 60*60*24*7; #[Route('/api/preg', name: 'api_preg_post', methods: ["POST"])] - public function index(Request $request, SerializerInterface $serializer, \Redis $redis): Response + public function index(Request $request, SerializerInterface $serializer, Redis $redis): Response { $dto = $serializer->deserialize($request->getContent(), PregDTO::class, 'json'); @@ -42,7 +43,7 @@ class PregController extends AbstractController } #[Route('/api/preg', name: 'api_preg_hash', methods: ["GET"])] - public function hash(Request $request, \Redis $redis): Response + public function hash(Request $request, Redis $redis): Response { $json = $redis->get(sprintf(self::STORE_KEY, $request->query->get('hash')));