Deprecated function: Return type of Shapefile\ShapefileReader::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include()

Created on 6 June 2023, over 1 year ago
Updated 7 June 2023, over 1 year ago

Hello all,

Problem/Motivation

After installing the Geolocation - Geometry Data submodule and the composer require gasparesganga/php-shapefile, I've started receving the warning of php type below:

Deprecated function: Return type of Shapefile\ShapefileReader::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 25 of /var/www/html/vendor/gasparesganga/php-shapefile/src/Shapefile/ShapefileReader.php)

#0 /var/www/html/web/core/includes/bootstrap.inc(158): _drupal_error_handler_real()
#1 /var/www/html/vendor/gasparesganga/php-shapefile/src/Shapefile/ShapefileReader.php(25): _drupal_error_handler()
#2 /var/www/html/vendor/composer/ClassLoader.php(582): include('...')
#3 /var/www/html/vendor/composer/ClassLoader.php(433): Composer\Autoload\{closure}()
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#5 /var/www/html/web/modules/contrib/geolocation/modules/geolocation_geometry/modules/geolocation_geometry_data/geolocation_geometry_data.install(33): class_exists()
#6 [internal function]: geolocation_geometry_data_requirements()
#7 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(409): call_user_func_array()
#8 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()
#9 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(408): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#10 /var/www/html/web/core/modules/system/src/SystemManager.php(109): Drupal\Core\Extension\ModuleHandler->invokeAll()
#11 /var/www/html/web/core/modules/system/src/Controller/SystemInfoController.php(49): Drupal\system\SystemManager->listRequirements()
#12 [internal function]: Drupal\system\Controller\SystemInfoController->status()
#13 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#14 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#16 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#17 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(163): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(74): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#19 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#20 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#21 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#22 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#26 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(686): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#27 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#28 {main}

What could be the reason for that?

Best,
Orkut

🐛 Bug report
Status

Closed: won't fix

Version

4.0

Component

Geometry

Created by

🇹🇷Turkey orkut murat yılmaz Istanbul

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

Comments & Activities

Production build 0.71.5 2024