-
Notifications
You must be signed in to change notification settings - Fork 160
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
"google/recaptcha" library | PhpUnit | Symfony recipes | Travis-CI | Bugfix #202
Conversation
@D3strukt0r Thanks for creating the repo. Since the proxy is required by other users, I suggest changing the code to support both options. Also, don't modify the config settings only the README, PHP and TWIG files, unless something fails when running test or required for your changes. Thanks again. |
To support proxy I need to create a copy of |
So, basically I'm finished. Everything should work just like before |
Here I tried to fix following stuff:
Instead of checking the reCaptcha on our its own, it will use the already given library from google.
What was done is running
$ composer require google/recaptcha
and then accordingly change the code insrc/Validator/Constraints/IsTrueValidator
However, by doing this the proxy functionality is gone. If this is no problem, the
README.md
andsrc/DependencyInjection/Configuration.php
file have to be configured!PhpUnit
Just a small change. In composer it now searches for the newest (and with php compatible) version of phpUnit just by using
"phpunit/phpunit": "^5 || ^6 || ^7"
. What had to be changed were the files "extended" from\PHPUnit_Framework_TestCase
toTestCase
Symfony recipes
When installing this bundle without a config file following error is generated:
This can be prevented if the owner(!) creates a pull request for the recipes repo (https://github.com/symfony/recipes-contrib). Please read requirements. For example, one of them is that
symfony/security
cannot be "required"I suggest following:
manifest.json
post-install.txt
config/packages/ewz_recaptcha.yaml
.travis.yml
Also here was done just a minor fix. Because previously not the right Symfony versions were tested
Bugfix
Personally I was never able to use this package for the following problem:
The problem lies in
src/DependencyInjection/EWZRecapchtaExtension.php
I couldn't find a better solution than following:
So this should be definitely reviewed!
6. php version compatibility reduced toPhpUnit ->createMock started on PhpUnit 5 (php 5.6+). Maybe use https://github.com/mockery/mockery ?>=5.3.9
As Symfony 2.8 requires min php 5.3.9 it would make sense to do the same for this project. The only features that can't be used is short array creation
[]
, insteadarray()
has to be used and the constant::class
has to be changed with the wholenamespace\class
.