Deprecated: Use of "static" in callables is deprecated

Created on 25 August 2023, over 1 year ago
Updated 9 October 2023, about 1 year ago

Problem/Motivation

After migrate to PHP 8.2 and Drupal 10. The following warning is generated.
In my project it is necessary to keep version 1.9.0 because there are many changes with later versions. The ideal is to move to the new versions soon, but for now we need the module not to generate warnings in version 1.9.0

Deprecated: Use of "static" in callables is deprecated in modules/contrib/schema_metatag/src/Plugin/metatag/Tag/SchemaTypeBase.php on line 53

Steps to reproduce

1. Install version 1.9.0 of the module.
2. Add the metatag field to a content
3. Edit and save content

Visibility warnings must be enabled in your settings.php

Proposed resolution

Change the mentioned line to
return array_map(static::class . '::removePrefix', $labels);

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇴Colombia yovanny.gomez.oyola

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

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024