Page MenuHomePhabricator

New GlobalConfigBuilder violates with PHP RFC restrict_globals_usage
Closed, ResolvedPublicBUG REPORT

Description

With the RFC restrict_globals_usage the way of how MediaWIki's GLobalConfigBuilder operates is not supported anymore. It is now not possible to use $GLOBALS by reference, which results in the following error message in PHP 8.1:

PHP Fatal error: Cannot acquire reference to $GLOBALS in /data/mediawiki/main/includes/Settings/Config/GlobalConfigBuilder.php on line 20

The relevant code is:

$this->config = &$GLOBALS;

Related Objects

Event Timeline

Change 747953 had a related patch set uploaded (by Florianschmidtwelzow; author: Florianschmidtwelzow):

[mediawiki/core@master] Fix Global var config for PHP 8.1

https://gerrit.wikimedia.org/r/747953

Krinkle renamed this task from MediaWiki Global-variable based config violates with PHP RFC restrict_globals_usage to New GlobalConfigBuilder violates with PHP RFC restrict_globals_usage.Dec 17 2021, 12:21 AM
Krinkle moved this task from Backlog to MediaWiki core on the PHP 8.1 support board.
Krinkle moved this task from Ideas to Doing on the MediaWiki-SettingsBuilder board.
Krinkle added a subscriber: daniel.
Krinkle added subscribers: Pchelolo, tchin.

Change 747953 merged by jenkins-bot:

[mediawiki/core@master] Settings: Fix GlobalConfigBuilder use of GLOBALS for PHP 8.1

https://gerrit.wikimedia.org/r/747953