Development with more PHP versions

Development with more PHP versions

by Martin Mastny -
Number of replies: 2
Picture of Core developers Picture of Peer reviewers Picture of Testers

Hello everyone,

my question is quite general. How do you folks at HQ and possibly other developers develop with more PHP versions? I used to have old PC with multiple PHP versions (5.6 and 7.1) installed and used fast-cgi, so different part of webserver is handled by different PHP. It worked that way, but it was hard to setup and I don't want to do it again on my new PC. 

Virtualization of any kind is very popular these days and I noticed that Dan and Rajesh from HQ made some progress with Docker. There are also other talented developers that go this direction. What do you guys use?

I also adopted MDK for developing, but I did not noticed any tweaks towards Docker recently. Are there any documents (I searched but could not find anything) describing development process? You could inspire other developers guys

Thanks and keep up great work

Average of ratings: -
In reply to Martin Mastny

Re: Development with more PHP versions

by Darko Miletić -

You can use docker or classic virtual machines. Either is just fine. Or you can do the following:

Determine moodle version you will use

Check minimal version of PHP it requires

Create docker or vm with that version of php and use it for development

Test the other versions of PHP using some form of continuous integration.

For example if you have your code on github you can use Travis CI.

A decent example of multiple version CI process can be found here

https://github.com/moodlerooms/moodle-local_xray

check the .travis.yml


Average of ratings: Useful (1)