3 ms·
It's been quite a while since I've looked at mediawiki. Has any of the codebase been transition to modern PHP?
by ibejoeb 6y ago
It's been quite a while since I've looked at mediawiki. Has any of the codebase been transition to modern PHP?
- edoceo 6y agoNot really, PHP is very backwards compatibility and I don't see lots of "modern" PHP (eg Traits, etc) in the code. I last looked at their release from a few months ago. I do lots of PHP migration work (4 to 5, 5 to 7) and for much of it it just works. Not much code change is necessary to the the upgraded features of the engine.
- bawolff 6y agoI feel like "traits" is just one particular feature, which by itself is not a good proxy for whether php is modern Disclaimer: am mediawiki dev. No opinion on if the codebase is "modern" because everyone defines that differently.
- edoceo 6y agoAgreed Traits is just a simple proxy. But nothing in there depends on new features of 7.3 right? MW has great backwards compatibility.
- bawolff 6y agoWikipedia is running php 7.2 https://en.wikipedia.org/wiki/Special:Version https://en.wikipedia.org/wiki/Special:Version so no. That said, new features do get used when they make sense, so we are definitely not maintaining back compat with ancient versions of php. (This includes a couple usages of traits, traits is just not something super common in mediawiki, but there are some cases where they are used)
- SargeZT 6y agoFor a project as widely used as Mediawiki, it completely makes sense to iterate slowly as PHP evolves. New features are a wonderful opportunity in many cases, but without a full understanding of how they may affect a very large code, caution is well warranted.
- trynewideas 6y agoWikimedia is only provisionally on 7.2 until they finish migrating ahead of the next Mediawiki LTS release. There are a bunch of points where they talk about the benefits of requiring 7.3 here: https://phabricator.wikimedia.org/T257879 https://phabricator.wikimedia.org/T257879 EDIT: Looks like the main blockers are related to moving to Debian 10. https://phabricator.wikimedia.org/T245757 https://phabricator.wikimedia.org/T245757
- trynewideas 6y agoAs of 1.35, the latest stable release requires 7.3: https://www.mediawiki.org/wiki/Manual:Installation_requirements#PHP https://www.mediawiki.org/wiki/Manual:Installation_requireme... 1.34 is the trailing legacy release and requires 7.2.9 or newer. 1.31 LTS, supported into 2021, requires 7.0 or later. In releases since 1.27 introduced PHP 7 support, the backward version compatibility has been tightening up more aggressively. PHP 7 brought a ton of performance gains that MW had previously relied on HHVM for, which gave them a lot of reasons to shed PHP 5 and start turning more forward-looking.