Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error SymfonyHttpClient::__construct(): Argument #1 ($httpClient) must be of type Symfony\Contracts\HttpClient\HttpClientInterface, null given #66

Closed
Arobases-e-commerce opened this issue Nov 22, 2023 · 4 comments · Fixed by #68

Comments

@Arobases-e-commerce
Copy link

Hello !

I m trying to use this good bundle, however my constraint Recaptcha3 is not called (i think the problem is the validation group)

When i m trying to add a validation group like this :

$builder ->add('captcha', Recaptcha3Type::class, [
            'constraints' => new Recaptcha3(['groups' => ['sylius']]),
            'action_name' => 'register',
            'locale' => 'fr'
]);

I have this error after :
Karser\Recaptcha3Bundle\RequestMethod\SymfonyHttpClient::__construct(): Argument #1 ($httpClient) must be of type Symfony\Contracts\HttpClient\HttpClientInterface, null given, called in /home/chouettemauve/preprod/sylius/var/cache/dev/ContainerM8OPDeO/getKarserRecaptcha3_ValidatorService.php on line 29

Do you know what is the problem ?

Thank you :)

@nexus23
Copy link

nexus23 commented Nov 30, 2023

with version 0.1.24 i have the same problem within a pimcore installation
with version 0.1.23 erverything is still working
There is a notice in 0.1.24: Add SymfonyHttpClient new ReCaptcha request method (@norkunas )
README
Symfony HttpClient integration
If you have a dependency on symfony/http-client in your application then it will be automatically wired to use via RequestMethod/SymfonyHttpClient.

But this does not work

@norkunas
Copy link
Contributor

norkunas commented Dec 1, 2023

Interesting. You both have symfony/http-client as a direct or indirect dependency but it is not wired?

@costa-jeremy
Copy link

Hello !

Thank you for the fix
It is possible to create a tag with this modification ?

@karser
Thanks

@karser
Copy link
Owner

karser commented Feb 8, 2024

@costa-jeremy done

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
5 participants