Refactor trigger_error in TypedConfigManager

Created on 2 April 2024, 17 days ago
Updated 14 April 2024, 5 days ago

Problem/Motivation

Spin off from ๐Ÿ“Œ Replace calls to ::expectError*(), if possible Needs review .

PHPUnit 9 deprecated ::expectError*() methods. They're removed from PHPUnit 10.

TypedConfigManager::get is triggering an E_USER_ERROR in some circumstances, and a test exists expecting that.

That test needs to remove the expectation, and the runtime code need to find a different strategy to raise the error if we want to keep it testable.

Proposed resolution

Replace trigger_error() with logging the error to the logger service, then throwing an \InvalidArgumentException.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Fixed

Version

10.3 โœจ

Component
Configurationย  โ†’

Last updated about 1 hour ago

Created by

๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

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

Merge Requests

Comments & Activities

Production build https://api.contrib.social 0.62.1