Creating this ticket for tracking Drupal 9 upgrade/implementation.

#3076970: Drupal 9 Deprecated Code Report was already closed, but there was no indication to whether Drupal 9 support will happen or not.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dpi created an issue. See original summary.

dpi’s picture

FileSize
434 bytes

Starting point.

Running drupal-check revealed no errors so far.

dpi’s picture

Category: Plan » Task
Status: Active » Needs review
FileSize
2.56 KB
dpi’s picture

FileSize
3.14 KB
vebrovski’s picture

Assigned: Unassigned » vebrovski
vebrovski’s picture

Assigned: vebrovski » Unassigned

Hi, thanks for the patch. I tested it on D8 and D9 with upgrade status which resulted in no errors, so did drupal check on D8. But I have some other php errors and that's why I will leave this as needs review for someone else to look.

sandboxpl’s picture

Status: Needs review » Needs work
-      - '@user.private_tempstore'
+      - '@tempstore.shared'

After this change the module dies:

TypeError: Argument 5 passed to Drupal\simple_recaptcha\SimpleReCaptchaFormManager::__construct() must be an instance of Drupal\Core\TempStore\PrivateTempStoreFactory, instance of Drupal\Core\TempStore\SharedTempStoreFactory given, called in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 257 in Drupal\simple_recaptcha\SimpleReCaptchaFormManager->__construct() (line 70 of /var/www/html/docroot/modules/contrib/simple_recaptcha/src/SimpleReCaptchaFormManager.php)
#0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(257): Drupal\simple_recaptcha\SimpleReCaptchaFormManager->__construct(Object(Drupal\Core\Config\ConfigFactory), Object(GuzzleHttp\Client), Object(Drupal\Core\Logger\LoggerChannelFactory), Object(Drupal\Core\Extension\ModuleHandler), Object(Drupal\Core\TempStore\SharedTempStoreFactory))
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal\Component\DependencyInjection\Container->createService(Array, 'simple_recaptch...')
#2 /var/www/html/docroot/modules/contrib/simple_recaptcha/modules/simple_recaptcha_webform/src/Plugin/WebformHandler/SimpleRecaptchaWebformHandler.php(126): Drupal\Component\DependencyInjection\Container->get('simple_recaptch...')
#3 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\simple_recaptcha_webform\Plugin\WebformHandler\SimpleRecaptchaWebformHandler::create(Object(Drupal\Core\DependencyInjection\Container), Array, 'simple_recaptch...', Array)
#4 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(76): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('simple_recaptch...', Array)
#5 /var/www/html/docroot/modules/contrib/webform/src/Controller/WebformPluginHandlerController.php(135): Drupal\Component\Plugin\PluginManagerBase->createInstance('simple_recaptch...')
#6 [internal function]: Drupal\webform\Controller\WebformPluginHandlerController->listHandlers(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\webform\Entity\Webform))
#7 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#8 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#11 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#13 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(705): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#22 {main}
sandboxpl’s picture

FileSize
3.15 KB

Step 1: switch from deprecated user.private_tempstore service to tempstore.private

sandboxpl’s picture

FileSize
7.3 KB

Step 2: reformat DI in SimpleRecaptchaWebformHandler to fix compatibility with webform 6.x branch

trebormc’s picture

#9 works fine. Thanks

sandboxpl’s picture

Reroll after implementing initial tests in #3152625, it required same changes in info file and deprecation fixes in services.yml file

  • sandboxpl committed 58bafe0 on 8.x-1.x
    Issue #3144718 by dpi, sandboxpl, vebrovski, trebormc: Drupal 9...
sandboxpl’s picture

Status: Needs work » Fixed

Committed to dev, new release will follow tonight,
patch is already passing first pack of tests, I will be working on more test coverage in coming days through #3152625
Thanks to all of you for help and reviews!

Status: Fixed » Closed (fixed)

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