Problem/Motivation

There is still a PHP 8.4 deprecation:

FILE: ...modules/contrib/search_api/tests/modules/search_api_test/src/MethodOverrides.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
 39 | WARNING | Passing E_USER_ERROR to trigger_error() is deprecated since 8.4.
    |         | Throw an exception or call exit with a string message instead.
    |         | (PHPCompatibility.ParameterValues.RemovedTriggerErrorLevel.Deprecated)
 59 | WARNING | Passing E_USER_ERROR to trigger_error() is deprecated since 8.4.
    |         | Throw an exception or call exit with a string message instead.
    |         | (PHPCompatibility.ParameterValues.RemovedTriggerErrorLevel.Deprecated)
--------------------------------------------------------------------------------------

Steps to reproduce

composer require --dev --with-all-dependencies \
    phpcompatibility/php-compatibility:10.x@dev \
    dealerdirect/phpcodesniffer-composer-installer:^1.1
php bin/phpcs -p -s \
  --standard=PHPCompatibility \
  --runtime-set testVersion 8.4 \
  --extensions="inc,install,module,php,profile,theme" \
  docroot/modules/contrib/search_api

Proposed resolution

Throw an exception instead of using trigger_error.

Issue fork search_api-3540758

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hosterholz created an issue. See original summary.

hosterholz’s picture

Status: Active » Needs review
Issue tags: +PHP 8.4
drunken monkey’s picture

Looks great, thanks! Merged.

drunken monkey’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.