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
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
Comment #3
hosterholzComment #4
drunken monkeyLooks great, thanks! Merged.
Comment #6
drunken monkey