Remove final from classes

Created on 29 November 2023, almost 2 years ago
Updated 17 August 2024, about 1 year ago

Problem/Motivation

The final keyword is a very useful tool for classes in core code. However it gets in the way when in the contrib modules.

We are currently extending the barcode field formatter plugin in drupal/autoshortqr to provide a computed qr code for nodes, overwriting only "settingsForm" to hide one option.

With the change to final classes, reusing the formatter becomes a lot more work, as we need to wrap the plugin.
As field formatter plugins have a clear interface defined by FormatterBase, I think we can make the plugin non-final.

What's the reason for the final keyword (except for phpstan inicating it)?

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland pvbergen

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024