Page MenuHomePhabricator

unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) trying to Update
Closed, DeclinedPublic

Description

Hi,

Linux version 4.9.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.65-3 (2017-12-03)
PHP 7.0.33-0+deb9u6
Mediawiki v1.31

After copying the extension to the LDAPProvider and adding

wfLoadExtension( 'LDAPProvider' );

to LocalSettings.php , I run

php maintenance/update.php

and I get this error:

PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /var/www/html/CED/mediawiki/extensions/LDAPProvider/src/Config.php on line 9

Event Timeline

class Config extends GlobalVarConfig {
	public const CLIENT_REGISTRY = 'ClientRegistry';

Visibility modifiers are only supported on PHP 7.1+. If you're using MediaWiki 1.31, you should use the corresponding version of the LDAPProvider extension, i.e. 1.31, which must be supporting PHP 7.0. You can select the right version at the download page.

Osnard subscribed.

REL1_31 of Extension:LDAPProvider does not contain this code.

MediaWiki 1.31 and PHP 7.1 are long obsolete, therefore closing this task.

But it is true that versioning and compatibility description of this extension is difficult to understand. My apologies.