Gregwar / CaptchaBundle

Symfony bundle implementing a "captcha" form type
MIT License
345 stars 127 forks source link

Type error: Too few arguments to function Gregwar\CaptchaBundle\Type\CaptchaType::__construct(), 0 passed in C:\xampp\htdocs\Web3\vendor\symfony\symfony\src\Symfony\Component\Form\FormRegistry.php on line 92 and exactly 4 expected #211

Closed MortalKonga closed 4 years ago

MortalKonga commented 4 years ago

I followed the guide to the letter. What am I doing wrong?

Gregwar commented 4 years ago

Can you tell what was wrong ?

MortalKonga commented 4 years ago

Can you tell what was wrong ?

I'm really sorry. Bundle registration was commented in AppKernel.php by a coworker who was trying another captcha bundle.

VinGit67 commented 4 years ago

Thank you, thank you, thank you ! I had the same problem, and unable to find any solution anywhere.

Thanks to your comment I came upon the idea to look into bundles.php and found that the bundle wasn't registered there... adding "Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true]" " did the trick !

My weekend will look much better now ;-)

Anyeos commented 4 years ago

Same problem here. But I have no coworkers :-/ I am using symfony flex but it appears to lack the corresponding script to make configurations.

I added it manually to config/bundles.php as follows: Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true],

Gregwar commented 4 years ago

Hello, Actually, this problem is already fixed, it was caused by the fact that the package type on composer was not specified as symfony-bundle, only I didn't re-tagged any version since then

I tagged v2.1.2 and installation should be OK now when using composer req gregwar/captcha-bundle