Consider using exceptions instead of null values to signal invalid plugins during discovery

Created on 12 July 2024, about 2 months ago

Problem/Motivation

While working on 🐛 Changing plugins from annotations to attributes in contrib leads to error if plugin extends from a missing dependency Needs review , it was highligthed that the return value of parseClass() as a structure with NULLs is strange, perhaps it should throw an exception in the failure case instead.

The reason we do it is:

              ['id' => $id, 'content' => $content] = $this->parseClass($class, $fileinfo);

so the return value is always expected in that structure. Need to understand if this is all internal enough that we can change it without BC implications.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component
Plugin 

Last updated about 13 hours ago

Created by

🇮🇹Italy mondrake 🇮🇹

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

Comments & Activities

Production build 0.71.5 2024