[9.5.x only] PHP 8.2 Creation of dynamic property Drupal\pgsql\Driver\Database\pgsql\Select::$alterMetaData is deprecated

Created on 19 December 2022, about 2 years ago
Updated 21 January 2023, almost 2 years ago

Problem/Motivation

As explained in parent issue, Drupal 9/10 should be compatible with PHP 8.2 and this time we have some query problems with PostgreSQL.

Steps to reproduce

Drupal Version: 9.5.0
Database: PostgreSQL 14.6 (Ubuntu 14.6-1.pgdg22.04+1)

Error log is below:

Deprecated function: Creation of dynamic property Drupal\pgsql\Driver\Database\pgsql\Select::$alterMetaData is deprecated in Drupal\Core\Database\Query\Select->addMetaData() (line 178 of /var/www/html/mywebsite/web/core/lib/Drupal/Core/Database/Query/Select.php)

#0 /var/www/html/mywebsite/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Database/Query/Select.php(178): _drupal_error_handler()
#2 /var/www/html/mywebsite/web/core/modules/views/src/Plugin/views/query/Sql.php(1418): Drupal\Core\Database\Query\Select->addMetaData()
#3 /var/www/html/mywebsite/web/core/modules/views/src/Plugin/views/query/Sql.php(1454): Drupal\views\Plugin\views\query\Sql->query()
#4 /var/www/html/mywebsite/web/core/modules/views/src/ViewExecutable.php(1325): Drupal\views\Plugin\views\query\Sql->build()
#5 /var/www/html/mywebsite/web/core/modules/views/src/ViewExecutable.php(1395): Drupal\views\ViewExecutable->build()
#6 /var/www/html/mywebsite/web/core/modules/views/src/ViewExecutable.php(1458): Drupal\views\ViewExecutable->execute()
#7 /var/www/html/mywebsite/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2459): Drupal\views\ViewExecutable->render()
#8 /var/www/html/mywebsite/web/core/modules/views/src/ViewExecutable.php(1666): Drupal\views\Plugin\views\display\DisplayPluginBase->preview()
#9 /var/www/html/mywebsite/web/core/modules/views/src/Plugin/views/area/View.php(125): Drupal\views\ViewExecutable->preview()
#10 /var/www/html/mywebsite/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2281): Drupal\views\Plugin\views\area\View->render()
#11 /var/www/html/mywebsite/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2226): Drupal\views\Plugin\views\display\DisplayPluginBase->renderArea()
#12 [internal function]: Drupal\views\Plugin\views\display\DisplayPluginBase->elementPreRender()
#13 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array()
#14 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback()
#15 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback()
#16 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender()
#17 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#18 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render()
#19 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#20 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(235): Drupal\Core\Render\Renderer->executeInRenderContext()
#21 /var/www/html/mywebsite/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#22 /var/www/html/mywebsite/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#23 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#24 /var/www/html/mywebsite/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#25 /var/www/html/mywebsite/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#26 /var/www/html/mywebsite/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#27 /var/www/html/mywebsite/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#28 /var/www/html/mywebsite/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#29 /var/www/html/mywebsite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#30 /var/www/html/mywebsite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#31 /var/www/html/mywebsite/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#32 /var/www/html/mywebsite/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#33 /var/www/html/mywebsite/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#34 /var/www/html/mywebsite/web/core/lib/Drupal/Core/DrupalKernel.php(707): Stack\StackedHttpKernel->handle()
#35 /var/www/html/mywebsite/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#36 {main}

What could be done, in order to deal with it?

Best,
Orkut

🐛 Bug report
Status

Fixed

Version

9.5

Component
Database 

Last updated 2 days ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇹🇷Turkey orkut murat yılmaz Istanbul

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs work almost 2 years ago
  • Status changed to RTBC almost 2 years ago
  • Status changed to Fixed almost 2 years ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024