Use of "self" in callables is deprecated

Created on 5 December 2023, 12 months ago
Updated 20 March 2024, 8 months ago

Problem/Motivation

I'm getting the error message Deprecated function: Use of "self" in callables is deprecated in Drupal\ckeditor5_premium_features\EditorXssFilter\CollaborationXSSFilter::preprocessElementValue() (line 67 of ...ckeditor5_premium_features/src/EditorXssFilter/CollaborationXSSFilter.php) using PHP 8.2.

Steps to reproduce

I haven't looked into how the module was setup on this site but just reloading a node edit page results in the error.

Proposed resolution

Why Drupal core uses static methods in an interface is beyond me, but it looks like changing "self::replaceSecurity" to [CollaborationXSSFilter::class, 'replaceSecurity'] in CollaborationXSSFilter.php might work. Likewise with revertSecurityReplace.

🐛 Bug report
Status

Fixed

Version

1.2

Component

Plugin: Collaboration

Created by

🇺🇸United States TolstoyDotCom L.A.

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

Comments & Activities

Production build 0.71.5 2024