|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Symfony\Component\DependencyInjection\Loader\Configurator; |
| 4 | + |
| 5 | +return static function (ContainerConfigurator $container) { |
| 6 | + $services = $container->services(); |
| 7 | + $parameters = $container->parameters(); |
| 8 | + |
| 9 | + $services->defaults() |
| 10 | + ->private() |
| 11 | + ->autowire(false) |
| 12 | + ->autoconfigure(false); |
| 13 | + |
| 14 | + $services->set('meteo_concept_h_captcha.captcha_verifier', \MeteoConcept\HCaptchaBundle\Service\HCaptchaVerifier::class) |
| 15 | + ->public() |
| 16 | + ->args([ |
| 17 | + service(\Psr\Http\Client\ClientInterface::class), |
| 18 | + service(\Psr\Http\Message\RequestFactoryInterface::class), |
| 19 | + service(\Psr\Http\Message\StreamFactoryInterface::class), |
| 20 | + '', |
| 21 | + service('logger')->nullOnInvalid(), |
| 22 | + ]); |
| 23 | + |
| 24 | + $services->alias(\MeteoConcept\HCaptchaBundle\Service\HCaptchaVerifier::class, 'meteo_concept_h_captcha.captcha_verifier') |
| 25 | + ->private(); |
| 26 | + |
| 27 | + $services->set('meteo_concept_h_captcha.captcha_validator', \MeteoConcept\HCaptchaBundle\Validator\Constraints\IsValidCaptchaValidator::class) |
| 28 | + ->public() |
| 29 | + ->args([ |
| 30 | + service('meteo_concept_h_captcha.captcha_verifier'), |
| 31 | + '', |
| 32 | + ]) |
| 33 | + ->tag('validator.constraint_validator'); |
| 34 | + |
| 35 | + $services->alias(\MeteoConcept\HCaptchaBundle\Validator\Constraints\IsValidCaptchaValidator::class, 'meteo_concept_h_captcha.captcha_validator') |
| 36 | + ->private(); |
| 37 | + |
| 38 | + $services->set('meteo_concept_h_captcha.hcaptcha_form_type', \MeteoConcept\HCaptchaBundle\Form\HCaptchaType::class) |
| 39 | + ->public() |
| 40 | + ->args([ |
| 41 | + service('meteo_concept_h_captcha.hcaptcha_value_fetcher'), |
| 42 | + '', |
| 43 | + ]) |
| 44 | + ->tag('form.type', ['alias' => 'hcaptcha']); |
| 45 | + |
| 46 | + $services->alias(\MeteoConcept\HCaptchaBundle\Form\HCaptchaType::class, 'meteo_concept_h_captcha.hcaptcha_form_type') |
| 47 | + ->private(); |
| 48 | + |
| 49 | + $services->set('meteo_concept_h_captcha.hcaptcha_value_fetcher', \MeteoConcept\HCaptchaBundle\Form\DataTransformer\HCaptchaValueFetcher::class) |
| 50 | + ->public() |
| 51 | + ->args([service('request_stack')]); |
| 52 | + |
| 53 | + $services->alias(\MeteoConcept\HCaptchaBundle\Form\DataTransformer\HCaptchaValueFetcher::class, 'meteo_concept_h_captcha.hcaptcha_value_fetcher') |
| 54 | + ->private(); |
| 55 | +}; |
0 commit comments