AssetResolver->getJsAssets() throwing warning on every page

Created on 14 April 2023, about 2 years ago
Updated 20 August 2023, over 1 year ago

Problem/Motivation

Running Drupal 9.5.7 on PHP 8.1.17
Each page load both public or within admin throwing 20+ warnings in the log per display.

Steps to reproduce

Load any display in public or admin, even in jsonapi end points.

Proposed resolution

Update usort expression to be supported by new php version.

Deprecated function: Use of "static" in callables is deprecated in Drupal\Core\Asset\AssetResolver->getJsAssets() (line 281 of /web/core/lib/Drupal/Core/Asset/AssetResolver.php)
#0 /web/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /web/core/lib/Drupal/Core/Asset/AssetResolver.php(281): uasort()
#3 /web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(318): Drupal\Core\Asset\AssetResolver->getJsAssets()
#4 /web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(157): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries()
#5 /web/core/modules/big_pipe/src/Render/BigPipeResponseAttachmentsProcessor.php(94): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments()
#6 /web/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php(45): Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments()
#7 [internal function]: Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond()
#8 /web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#9 /vendor/symfony/http-kernel/HttpKernel.php(202): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#10 /vendor/symfony/http-kernel/HttpKernel.php(190): Symfony\Component\HttpKernel\HttpKernel->filterResponse()
#11 /vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#12 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#13 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#14 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#15 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#16 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#17 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#18 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#19 /web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#20 /web/index.php(19): Drupal\Core\DrupalKernel->handle()
#21 {main}
πŸ› Bug report
Status

Closed: duplicate

Version

9.5

Component
Asset libraryΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States emptyvoid

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

Comments & Activities

Production build 0.71.5 2024