Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use google-recaptcha recipe #35

Open
Grafikart opened this issue Nov 8, 2018 · 3 comments · May be fixed by #57
Open

Use google-recaptcha recipe #35

Grafikart opened this issue Nov 8, 2018 · 3 comments · May be fixed by #57

Comments

@Grafikart
Copy link
Contributor

Since google-recaptcha has an associated recipe (https://github.com/symfony/recipes-contrib/tree/master/google/recaptcha).
Could this bundle uses the service injected from google-recaptcha instead of redefining a new one ?

@garak
Copy link
Member

garak commented Dec 29, 2024

There's no such thing as "the service injected from google-recaptcha".
The recipe you've linked creates a service inside the Symfony project you install the library, it doesn't define a service itself.

I can't see how this could be better than having an explicit service defined by this bundle.

@Grafikart
Copy link
Contributor Author

The recipe I linked create a service for ReCaptcha\ReCaptcha here and becaptcha creates a service beelab_recaptcha2.google_recaptcha so there is 2 instance of "ReCaptcha\ReCaptcha" .

My issue (if I recall correctly it's a bit old) is that when I used ReCaptcha\ReCaptcha in a controller I expected to get the beelab captcha instance and got the google/recaptcha instead but feel free to close this issue since It can now be easily fixed with #[Autowiring] attribute in symfony.

@garak
Copy link
Member

garak commented Dec 30, 2024

I see the problem: the user should not apply the recipe from Google.
Probably we should advise the user in the documentation about it.

Do you mind to propose a PR?

@garak garak linked a pull request Jan 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants