From 07a1d6e201a68cc69337c384461c0e9b64c0f971 Mon Sep 17 00:00:00 2001 From: cbeauvoi Date: Mon, 18 Feb 2019 18:18:20 +0100 Subject: [PATCH] test --- composer.lock | 19 +++++++++++++++++++ config/services.yaml | 3 +++ src/Validator.php | 3 +-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..0d3cccf --- /dev/null +++ b/composer.lock @@ -0,0 +1,19 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "692cf76646b7b8c0cf2b57040ee21139", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.1" + }, + "platform-dev": [] +} diff --git a/config/services.yaml b/config/services.yaml index 7e257e6..7eefbc0 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -2,3 +2,6 @@ services: _default: autowire: true autoconfigure: true + Bluesquare\Validator: + class: Bluesquare\Validator + arguments: ['@request_stack', '@translator_interface'] diff --git a/src/Validator.php b/src/Validator.php index 71ae490..2da8edb 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -2,13 +2,12 @@ namespace Bluesquare; -use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Contracts\Translation\TranslatorInterface; use Traversable; -class Validator extends ServiceEntityRepository +class Validator { protected $request; protected $context;