PHP 8.2 compatibility

Created on 5 October 2023, about 1 year ago
Updated 13 September 2024, 3 months ago

Problem/Motivation

When using this module with PHP 8.2, there are some deprecation notices:

Deprecated function: Creation of dynamic property Drupal\jsonrpc\Annotation\JsonRpcMethod::$output is deprecated in Drupal\Core\Cache\ApcuBackend->getMultiple() (line 90 of core/lib/Drupal/Core/Cache/ApcuBackend.php).
Drupal\Core\Cache\ApcuBackend->getMultiple(Array, ) (Line: 141)
Drupal\Core\Cache\ChainedFastBackend->getMultiple(Array, ) (Line: 103)
Drupal\Core\Cache\ChainedFastBackend->get('jsonrpc_plugins') (Line: 37)
Drupal\Core\Plugin\DefaultPluginManager->cacheGet('jsonrpc_plugins') (Line: 213)
Drupal\Core\Plugin\DefaultPluginManager->getCachedDefinitions() (Line: 179)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('user.verify_email', ) (Line: 117)
Drupal\jsonrpc\Handler->getMethod('user.verify_email') (Line: 101)
Drupal\jsonrpc\Handler->supportsMethod('user.verify_email') (Line: 128)
Drupal\jsonrpc\Shaper\RpcRequestFactory->denormalizeParams(Array, Object) (Line: 110)
Drupal\jsonrpc\Shaper\RpcRequestFactory->denormalizeRequest(Array, Object) (Line: 88)
Drupal\jsonrpc\Shaper\RpcRequestFactory->Drupal\jsonrpc\Shaper\{closure}(Array)
array_map(Object, Array) (Line: 87)
Drupal\jsonrpc\Shaper\RpcRequestFactory->doTransform(Array, Object) (Line: 33)
Shaper\Transformation\TransformationBase->transform(Array, Object) (Line: 214)
Drupal\jsonrpc\Controller\HttpController->getRpcRequests(Object) (Line: 152)
Drupal\jsonrpc\Controller\HttpController->resolve(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 182)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Call a JSON:RPC operation with PHP 8.2.

Proposed resolution

Eliminate the deprecation notice.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇯🇵Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024