google/recaptcha

PHP 8.2 deprecations

raspgot opened this issue · 3 comments

Issue description
PHP 8.2 deprecations are being triggered.
Creation of dynamic property ReCaptcha\ReCaptcha::$hostname is deprecated in \recaptcha\ReCaptcha\ReCaptcha.php on line 216

Environment

  • OS name and version:
  • PHP version: 8.2.1
  • google/recaptcha version: php_1.2.4

Solution
https://www.php.net/releases/8.2/en.php#deprecate_dynamic_properties
Add AllowDynamicProperties attribute in \recaptcha\ReCaptcha\ReCaptcha.php : 40

#[\AllowDynamicProperties]
class ReCaptcha
{
    ...
}

There seem to be a PR for it PR-510 but it is not yet approved. I am here waiting on the approval myself.

@tommygooden Same, I'm kind of feeling this project is dead

Merged and released.