Page MenuHomePhabricator

Introduce ext-ds to MediaWiki core requirements?
Open, Needs TriagePublic

Description

This is forked from a discussion had on the wikimedia slack...

PHP doesn't ship with data structures like Set's (and many other) like other languages, meaning a lot of the data storage we do tends to be in arrays.

This is to explore whether we should include ext-ds as a default requirement PHP extension in MediaWiki core, and then, as such, start being able to use it.

Obviously if this is approved, we potentially need to get SRE to package it (I suspect we don't by default; and we're not going to install it via pecl), installed on app servers, k8s, and into CI images etc.

Then in the next MW release, it could become a default requirement. This is obviously an extra install for sysadmins, but when it's seemingly packaged on most linux OS's, it hopefully shouldn't be too much of a burden.

All of which is doable, but the question is whether this is something we want to start using inside PHP land of MediaWiki.

https://www.php.net/manual/en/book.ds.php
https://www.php.net/manual/en/intro.ds.php
https://packages.debian.org/bullseye/php-ds
https://packages.ubuntu.com/kinetic/php-ds
https://pecl.php.net/package/ds

Event Timeline

It would be the first PHP extension that isn't bundled with PHP on Windows. Given that PECL doesn't offer new Windows DLL's anymore, this would (in the future) make using MediaWiki on Windows more difficult. The compilation process on Windows isn't easy either.

There's a polyfill though. That might be enough.

Good point, thanks.

I think including the polyfill is certainly doable.