Problem/Motivation

The function "call_user_func(array($class, 'getInfo'))" placed in the Drupal core (docroot/modules/simpletest/simpletest.module) calling a non-static method "getInfo()" in the "apps/apps.test" as static.
Starting from PHP8.0 its causing fatal error.

TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method AppstoreUnitTestCase::getInfo() cannot be called statically in simpletest_test_get_all() (line 372 of /simpletest/simpletest.module).

Occurs when going to /admin/config/development/testing

So I propose changing the non-static method to static.

Comments

Igumnov_aleksey created an issue. See original summary.

Igumnov_aleksey’s picture

Igumnov_aleksey’s picture

Title: PHP 8.0 Deprecated function: Non-static method AppstoreUnitTestCase::getInfo() » PHP 8.0 FatalError: Non-static method AppstoreUnitTestCase::getInfo()
Issue summary: View changes
Igumnov_aleksey’s picture

Issue summary: View changes