Problem/Motivation

Running run-tests.sh under PHP 8.1 yields many errors like this:

PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/core/scripts/run-tests.sh on line 548

Relevant PHP change.

Steps to reproduce

Spin up a PHP 8.1 environment and run run-tests.sh. Forgot how? Here's how.

See the deprecation errors.

Proposed resolution

Fix the things in the deprecation errors.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3316971

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mile23 created an issue. See original summary.

Mile23’s picture

Status: Active » Needs review

Puts some checking around a usage of str_replace().

Mile23’s picture

Issue summary: View changes
andypost’s picture

Status: Needs review » Reviewed & tested by the community

used to run tests on PHP 8.2 and I see that SERVER_SOFTWARE key is NULL for me

Mile23’s picture

  • catch committed f4a08b7 on 10.0.x
    Issue #3316971 by Mile23, andypost: Ensure run-tests.sh works with...
  • catch committed fb0e14e on 10.1.x
    Issue #3316971 by Mile23, andypost: Ensure run-tests.sh works with...
  • catch committed 3aebb57 on 9.5.x
    Issue #3316971 by Mile23, andypost: Ensure run-tests.sh works with...
catch’s picture

Version: 10.1.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked back through to 9.5.x, thanks!

Status: Fixed » Closed (fixed)

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