Deprecated function: CSSSnippet::jsonSerialize()

Created on 2 June 2022, over 2 years ago
Updated 23 March 2023, over 1 year ago

Problem/Motivation

Using Picture Background Formatter 8.x-1.x-dev with Drupal 9.3.15 and PHP 8.1, I get this notice:

Deprecated function: Return type of Drupal\picture_background_formatter\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 7 of modules/contrib/picture_background_formatter/src/Component/Render/CSSSnippet.php).

πŸ› Bug report
Status

Fixed

Version

1.0

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.71.5 2024