geerlingguy / ansible-role-php-versions

Ansible Role - PHP Versions
https://galaxy.ansible.com/geerlingguy/php-versions/
MIT License
98 stars 73 forks source link

Add support for discontinued versions of PHP #5

Closed gheydon closed 7 years ago

gheydon commented 7 years ago

I know versions of PHP have had support dropped so you have drawn a line in the sand to not support them.

I am using DrupalVM and trying to align as closely with a client site is not always possible using stable versions.

Would it be possible add in support for unsupported versions of Drupal so that we can be working on the same version of PHP as client sites.

This could be added as an unsupported enhancement. For me if 5.5 can be added it would make this much easier for me, as I don't have to stop the development team from using 5.6 functionality.

Thanks.

geerlingguy commented 7 years ago

@gheydon - The only difficulty is it's really hard to support older versions when using any of the repositories with modern versions, mostly because all the way up the chain, nobody really wants to support really old versions.

The best solution if not using Drupal VM would be to not use this role, but to use the PHP role directly, and use the system PHP packages, which include PHP 5.5.x (Ubuntu 14.04) or PHP 5.3.x (CentOS 6). I think you could even get 5.4.x if using system packages on CentOS 7.

I don't think I'll be able to add support for < 5.6 on Drupal VM though, just because it would be a lot of extra work to make it possible to use [5.6|7.0|7.1] and any other older version.

It's already difficult enough to support both 5.6 and 7.1 :)

geerlingguy commented 7 years ago

Actually, come to think of it, you may be able to hack around the variables this role defines (e.g. php_packages) and use an OS with a reasonably-old default version (e.g. CentOS 6 or 7), and get the version you need using system packages.

Definitely not supported, but it should work. You can find the package names (most are the same on the CentOS / RHEL side) by searching internet tutorials for 'install PHP on CentOS [version]'

gheydon commented 7 years ago

I have been looking a bit more, and found that we can build from source, but it is having some problems with the build dependencies. ie. bison needs to be version 2.7 not 3.0 so for 5.5 (i think at this stage) installing the correct version of bison and then building would work. You could then just have some docs which contains the variables that need to be added to the config to get it going. But this would be more a drupalvm docs addition but there is some work that would need to be done with ansible-role-php to allow it, and then the docs additions for installing different versions of php and different os's