Deprecated function: CSSSnippet::jsonSerialize()

Created on 27 July 2022, almost 2 years ago
Updated 23 May 2024, about 1 month ago

Problem/Motivation

Using Background Image Field 8.x-1.7 with Drupal 9.4.3 and PHP 8.1, I get this notice:

Deprecated function: Return type of Drupal\bg_img_field\Component\Render\CSSSnippet::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 10 of modules/contrib/bg_img_field/src/Component/Render/CSSSnippet.php).

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡¬πŸ‡·Greece balis_m

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

    The issue particularly affects sites running on PHP version 8.1.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.

Production build 0.69.0 2024