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;