Page MenuHomePhabricator

[Semantic Internal Objects] PHP7 constructor class name for SIOInternalObject
Open, Needs TriagePublic

Description

When using the SIOInternalObject, I see the following deprecation warning:

PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; SIOInternalObject has a deprecated constructor in .../mediawiki-1.34.1/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php on line 12

I am using PHP7 with MediaWiki 1.34.1.

Based on what I see here, I was hoping to propose this fix in order to address this:
https://github.com/wikimedia/mediawiki-extensions-SemanticInternalObjects/blob/master/SemanticInternalObjects_body.php#L17
To be changed to

public function __construct( $mainTitle, $index ) {

Please let me know if this request should be posted elsewhere or if I am missing something. Would love to receive feedback, thoughts, or ideas on this! If this is something that can be improved, I can go ahead submit a PR to the Gerrit, where it seems the source is hosted.
Thanks!

Event Timeline

Please let me know if this request should be posted elsewhere or if I am missing something.

https://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects#Bugs_and_feature_requests says to send an email to a list or a private message; so here might indeed be the wrong place if there's really no project/place to track bug reports for the SemanticInternalObjects extension. CC'ing @Yaron_Koren (listed as author).

Aklapper renamed this task from PHP7 constructor class name for SIOInternalObject to [Semantic Internal Objects] PHP7 constructor class name for SIOInternalObject.Jun 23 2020, 4:47 AM