PHP 8.2 deprecation warning.

Created on 30 October 2023, 11 months ago
Updated 31 October 2023, 11 months ago

Problem/Motivation

I have recently upgrade from Drupal 9.5.11 >> 10.1.5 after having carefully checked and double-checked everything on my local dev build with the Upgrade Status module.

Everything passed muster and everything works fine.

However, locally I am using PHP 8.1.0 and on production I am able to use PHP 8.2 and on production, I started seeing the following problem which in my case, stopped Drupal from being able to render the pages ...

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 216
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 304
Deprecated: Using ${expr} (variable variables) in strings is deprecated, use {${expr}} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 304
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 305
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 312
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 314
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in <my-site>public_html/modules/contrib/lazy/lazy.module on line 314

The website encountered an unexpected error. Please try again later.
RuntimeException: Failed to start the session because headers have already been sent by "<my-site>public_html/modules/contrib/lazy/lazy.module" at line 216. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 132 of vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (Line: 144)
etc.

If it helps anyone else in the same situation, a quick-fix test by replacing all occurrences of ${ with {$ fixed the problem.

Thanks all

🐛 Bug report
Status

Closed: duplicate

Version

3.12

Component

Code

Created by

🇬🇧United Kingdom SirClickALot Somerset

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

Comments & Activities

Production build 0.71.5 2024