Find an alternative to trigger_error in Drupal\Core\Database\Query\Condition::compile

Created on 7 February 2024, 10 months ago
Updated 26 April 2024, 7 months ago

Problem/Motivation

Spin off from ๐Ÿ“Œ [meta] Replace calls to ::expectError*() and ::expectWarning*() Active .

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

Drupal\Core\Database\Query\Condition::compile() 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

Throw an exception earlier in Condition::condition() instead of waiting until Condition::compile().

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
PHPUnitย  โ†’

Last updated about 22 hours 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 0.71.5 2024