unsafe usage of new static()

Created on 19 March 2025, 22 days ago

Problem/Motivation

phpstan reports,

Unsafe usage of new static().
πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static

on AutoEntityLabelPermissionController, AutoEntityLabelForm, AutoEntityLabelConfigTask, and EntityLabelNotNullConstraintValidator.

Steps to reproduce

phpstan analyse auto_entitylabel

Proposed resolution

In AutoEntityLabelForm, use the $instance = parent::create() pattern instead of implementing __construct(). In the other three, mark __construct() as final.

Remaining tasks

make an MR

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

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