KonstantinCodes / mautic-recaptcha

This Plugin brings reCAPTCHA integration to mautic.
GNU General Public License v3.0
50 stars 29 forks source link

Mautic 5 Incompatible #49

Open J-Wick4 opened 7 months ago

J-Wick4 commented 7 months ago

Looks like a few tweaks need to be made to make it work for Mautic 5.

PHP Fatal error: Declaration of MauticPlugin\MauticRecaptchaBundle\Integration\RecaptchaIntegration::appendToForm(&$builder, $data, $formArea) must be compatible with Mautic\PluginBundle\Integration\AbstractIntegration::appendToForm(&$builder, $data, $formArea): void in /var/www/vhosts/domain.net/subdomains/hello5/docroot/plugins/MauticRecaptchaBundle/Integration/RecaptchaIntegration.php on line 51

In RecaptchaIntegration.php line 51:

Compile Error: Declaration of MauticPlugin\MauticRecaptchaBundle\Integration\RecaptchaIntegration::appe
ndToForm(&$builder, $data, $formArea) must be compatible with Mautic\PluginBundle\Integration\AbstractI
ntegration::appendToForm(&$builder, $data, $formArea): void

technik-kvz commented 7 months ago

I wrote a hack in my repo: https://github.com/technik-kvz/mautic-recaptcha/tree/mautic5 if you want to have a look. For me it runs, but it is a dirty hack since I put the code in a helper PHP instead of writing twig stuff (which I was never in touch before).

J-Wick4 commented 7 months ago

I wrote a hack in my repo: https://github.com/technik-kvz/mautic-recaptcha/tree/mautic5 if you want to have a look. For me it runs, but it is a dirty hack since I put the code in a helper PHP instead of writing twig stuff (which I was never in touch before).

Thanks, I'll take a look soon.