Jump to content

Topic on Project:Support desk

Vagrant using none master branch

11
83.32.33.130 (talkcontribs)

Hi, I am trying to develop an extension. I'm using Vagrant but it will not spin up when I try to use a non-master branch for core.


I'm using:

vagrant hiera mediawiki::branch REL1_35


as per MediaWiki-Vagrant


Am I missing something obvious?


on a separate note, is Vagrant still the main dev solution? I see docker instructions are included in mediawiki core, but seems less developed?

83.32.33.130 (talkcontribs)

The issue seems to be that REL1_35 requires PHP 7.3.19 or higher while 7.2.31 is installed.


The ironic part is that 1.36.0-alpha works with 7.2.31.


i.e. MediaWiki 1.36 requires a lower version of PHP than MediaWiki 1.35?!?!?!?!

83.32.33.130 (talkcontribs)

What am I missing?

en.wikipedia runs on PHP 7.2.31 and 1.36

but mediawiki 1.35 requires PHP 7.3.19

Malyacko (talkcontribs)

Nothing. There are public and stable tarball versions for 1.35, and there are internal non-stable weekly versions for 1.36, until a public stable 1.36 tarball version will be released which will also require PHP 7.3. See also Compatibility and Support policy for PHP.

83.32.33.130 (talkcontribs)

Thank you Malyacko. I guess the part I'm surprised about is that Wikimedia hasn't upgraded to at least 7.3.19 (and debian buster).


Is there an easy way to upgrade to PHP 7.3.19 in MediaWiki-Vagrant?

Malyacko (talkcontribs)
83.32.33.130 (talkcontribs)

Thank you, very helpful. I see why there's a mismatch between the PHP versions. I guess makes sense for an LTS version.


It also seems that WMF is actually updating to buster and 7.3 or 7.4, and it may not be far away. Hopefully an update to MediaWiki-Vagrant would follow.


Wikimedia is currently on php 7.2, and I expect the move from 7.2 to 7.3 or 7.4 will only happen after we've migrated to debian buster. That implies we have to do an ICU upgrade - a painful process we'll likely start around the end of September. I would expect the WMF to be able to move to php 7.3 no sooner than the end of the year.

83.32.33.130 (talkcontribs)
Ciencia Al Poder (talkcontribs)

Just modify the downloaded source code of MediaWiki, in PHPVersionCheck.php edit the line that requires php 7.3.17 (put 7.2.0 or similar), and edit composer.json too. That's way easier than trying to upgrade PHP on the vagrant machine. I upgraded it, but a vagrant provision reverted everything again

83.52.2.134 (talkcontribs)

Thank you very much Ciencia Al Poder. I did that, and indeed seems to be the easiest way until WMF upgrades to php 7.3.


I'm am not a puppet expert but for the benefit of anyone else, what I did is:

  1. fork the mediawiki-vagrant repo
  2. add the following at the end of puppet/modules/mediawiki/manifests/init.pp:

exec { "change min php mediawiki":

       command => 'sed -i "s/7.3.19/7.2.31/g" /vagrant/mediawiki/includes/PHPVersionCheck.php',

       provider => shell,

       require   => Git::Clone['mediawiki/core'],

   }

   exec { "change min php composer":

       command => 'sed -i "s/7.3.19/7.2.31/g" /vagrant/mediawiki/composer.json',

       provider => shell,

       require   => Git::Clone['mediawiki/core'],

   }

   exec { "change doctrine dbal composer":

       command => 'sed -i "s@doctrine/dbal\": \"3.0.0@doctrine/dbal\": \"2.10.4||3.0.0@g" /vagrant/mediawiki/composer.json',

       provider => shell,

       require   => Git::Clone['mediawiki/core'],

   }

Sebastian Berlin (WMSE) (talkcontribs)

I just installed 1.35 and it worked when I put the additions to puppet/modules/mediawiki/manifests/init.pp right above the line

exec { 'update_all_databases':

Otherwise the PHP version was checked before the changes were made.

I also changed

sed -i "s@doctrine/dbal\": \"3.0.0@doctrine/dbal\": \"2.10.4||3.0.0@g" /vagrant/mediawiki/composer.json

to

sed -i "s@doctrine/dbal\": \"3.1.5@doctrine/dbal\": \"2.10.4||3.0.0@g" /vagrant/mediawiki/composer.json

in the last section.

Reply to "Vagrant using none master branch"