Dynamic Properties are deprecated in PHP 8.2

Created on 17 April 2023, over 1 year ago
Updated 18 July 2023, about 1 year ago

Problem/Motivation

Dynamic Properties are deprecated in PHP 8.2 (see: https://php.watch/versions/8.2/dynamic-properties-deprecated)

Steps to reproduce

Install module on a Drupal installation that uses PHP >= 8.2

Deprecated function: Creation of dynamic property Drupal\admin_toolbar_version\VersionInfoManager::$file_system is deprecated in Drupal\admin_toolbar_version\VersionInfoManager->__construct() (line 25 of /usr/src/app/web/modules/contrib/admin_toolbar_version/src/VersionInfoManager.php)
#0 /usr/src/app/web/core/includes/bootstrap.inc(158): _drupal_error_handler_real(8192, 'Creation of dyn...', '/usr/src/app/we...', 25)
#1 /usr/src/app/web/modules/contrib/admin_toolbar_version/src/VersionInfoManager.php(25): _drupal_error_handler(8192, 'Creation of dyn...', '/usr/src/app/we...', 25)
#2 /usr/src/app/web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\admin_toolbar_version\VersionInfoManager->__construct(Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\Core\Extension\ModuleExtensionList), Object(Drupal\Core\File\FileSystem))
#3 /usr/src/app/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'admin_toolbar_v...')
#4 /usr/src/app/web/core/lib/Drupal.php(197): Drupal\Component\DependencyInjection\Container->get('admin_toolbar_v...')
#5 /usr/src/app/web/modules/contrib/admin_toolbar_version/admin_toolbar_version.module(46): Drupal::service('admin_toolbar_v...')
#6 /usr/src/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): admin_toolbar_version_menu_links_discovered_alter(Array, NULL, NULL)
#7 /usr/src/app/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(166): Drupal\Core\Extension\ModuleHandler->alter('menu_links_disc...', Array)
#8 /usr/src/app/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(189): Drupal\Core\Menu\MenuLinkManager->getDefinitions()
#9 /usr/src/app/web/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php(82): Drupal\Core\Menu\MenuLinkManager->rebuild()
#10 /usr/src/app/web/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php(70): Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber->menuLinksRebuild()
#11 [internal function]: Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber->onRouterRebuild(Object(Drupal\Component\EventDispatcher\Event), 'routing.route_f...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#12 /usr/src/app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Drupal\Component\EventDispatcher\Event), 'routing.route_f...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#13 /usr/src/app/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(197): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Component\EventDispatcher\Event), 'routing.route_f...')
#14 /usr/src/app/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(210): Drupal\Core\Routing\RouteBuilder->rebuild()
#15 /usr/src/app/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(222): Drupal\Core\Routing\RouteBuilder->rebuildIfNeeded()
#16 /usr/src/app/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\Core\Routing\RouteBuilder->destruct()
#17 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#18 /usr/src/app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#19 /usr/src/app/vendor/symfony/http-kernel/HttpKernel.php(97): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...')
#20 /usr/src/app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(63): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#21 /usr/src/app/web/core/lib/Drupal/Core/DrupalKernel.php(670): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#22 /usr/src/app/web/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#23 {main}
.
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy mithenks

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024