Problem/Motivation

Fix Drupal >=9.2 deprecations in the module, which will lead module one step closer to Drupal 10 readiness.

Issue fork recaptcha-3272700

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

n4r3n created an issue. See original summary.

japerry’s picture

Status: Active » Needs work

These changes only affect tests, I see no reason to update the minimum version to 9.2. recaptcha should remain 8.9+, but have the tests updated to support only 9.2. This allows customers to run the module on earlier, non supported versions of Drupal, but brings the testing upto speed with current versions of Drupal.

n4r3n’s picture

Status: Needs work » Needs review
bas123’s picture

Drupal v. 9.3.9
reCaptcha v. 8.x-3.0

Image challenge completes and Login sends user to error page:

The website encountered an unexpected error. Please try again later.
Error: Class 'ReCaptcha\ReCaptcha' not found in recaptcha_captcha_validation() (line 162 of modules/recaptcha/recaptcha.module).
recaptcha_captcha_validation(, 'Google no captcha', Array, Object) (Line: 510)
captcha_validate(Array, Object, Array)
call_user_func_array('captcha_validate', Array) (Line: 282)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'user_login_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('user_login_form', Array, Object) (Line: 588)
Drupal\Core\Form\FormBuilder->processForm('user_login_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Math and Image methods work smoothly!

Why is this still unresolved?

Berdir made their first commit to this issue’s fork.

berdir’s picture

Title: Make module compatible with Drupal >=9.2 » Drupal 10 compatibility

Updating title, it's not about D10 compatibility, the module is compatible with 9.2 just fine, it just has deprecations.

Pushed a bunch of fixes and improvements, the test passes now for me on D10.

Not sure why you want to keep D8 compatibility when it can't be tested, D8 is unsupported for 6+ months now and everyone is moving on, but that's your call.

neclimdul’s picture

Status: Needs review » Reviewed & tested by the community

LGTM. Code looks correct, tests run without any deprecation, and upgrade_status reports no problems which is good enough to commit. Unblocks some test failures for other issues too so bonus.

mglaman’s picture

+1 all deprecations are just in tests

japerry’s picture

Ensure we're using the D10+ compatible version of the captcha module.

Since captcha is 8.9+ compatible, and unfortunately many people are still using Drupal 8, making it compatible (widening the supported versions) helps customers upgrade to drupal 9 or 10 without having another module getting in the way of the dependency tree.

That said, as soon as the Drupal 9 LTS (9.5?) comes out, I'd argue making all module minimums compatible with that version, regardless of it technically could work with D8.

jcnventura’s picture

Status: Reviewed & tested by the community » Needs work

I'd rather that no release ever comes out stating that it is compatible with ">= 8.9".. That means one day composer will install that release for Drupal 19. The constraint should really be ">=8.9 <11", if you don't want to write "^8.9 || ^9 || ^10"

kim.pepper’s picture

Agree with #11 I prefer the more verbose version. We can drop ^8.9in a later release.

Can we change it to:

^8.9 || ^9 || ^10

berdir’s picture

Status: Needs work » Reviewed & tested by the community

Updated through the MR suggestion feature.

jcnventura’s picture

Thanks Berdir! I agree with the RTBC status.

  • kim.pepper committed 1beaaed on 8.x-3.x authored by n4r3n
    Issue #3272700: Make module compatible with Drupal >=9.2
    
kim.pepper’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.