Make field formatters extendable

Created on 10 April 2025, 15 days ago

Problem/Motivation

PHPStan warnings were fixed in πŸ“Œ Fix phpstan warnings Active . In field formatters create method was new static() replaced with new self(). If I had to guess, there was warning "Unsafe usage of new static()" reported and this was attempt to fix it. This fix made field formatter classes non extendable, since self resolves to field formatter class and not to the class that extends it.

Proposed resolution

Use the $instance = parent::create() pattern instead of implementing __construct().

πŸ› Bug report
Status

Active

Version

3.0

Component

Video Embed Field (base module)

Created by

πŸ‡ΈπŸ‡°Slovakia trafo

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