RobLoach / drush-docker

:whale: Docker Container to run Drush
http://registry.hub.docker.com/u/drush/drush
Other
19 stars 19 forks source link

PHP 7 causes problems for non D8 sites #26

Closed danquah closed 8 years ago

danquah commented 8 years ago

I just noticed that the drush-docker now uses PHP 7 as pr https://github.com/RobLoach/docker-composer/commit/bf8224d45c2386bc067dd0c9f5d2b874e0fcfd7e

$ docker run -ti --rm --entrypoint php drush/drush:8 -v
PHP 7.0.5 (cli) (built: Apr  5 2016 02:03:18) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

While this is great for Drupal 8 (and I assume also for the composer image), it causes all sorts of problems when used on Drupal 7 sites where neither core nor contrib really supports PHP 7.

To take it even further, we've had the need to create a custom drush-image in order to support a Drupal 6 site running php 5.3 (https://github.com/reload/docker-drush6-php53/blob/master/Dockerfile), and it would of cause had been great if we could just have used your semi-official drush image.

It would be wonderfull if we could have tagged versions of the drush-image for the combination of all supported versions of drush (7, 8, 9) and all relevant php-versions. "Relevant" being up for discussion, if we get to the point where eg 5.3, 5.6 and 7 are on the list, getting the rest of the minor-versions of PHP is probably just a matter of adding them to a list being fed into a build-script :)

As I see it it would either mean that the composer-image would have to offer up versions using the same php versions or the drush base-image would have to stop using the composer-image as a base, and go straight to the php images. As there is no strict dependency between drush and composer - I think the best (albeit more complicated) way to go would be to stop using composer as a base image.

I know it will complicate this image quite a bit more, but it would be really useful, and frankly I think it should be expected of a offical drush image to offer all supported versions of Drush running on all supported "major" versions of php.

I'll be happy to pitch in in getting this rolling,as I'm sure would a number of my colleagues, should you want some input/help.

pirog commented 8 years ago

@danquah, @RobLoach and i have talked about this a bit and i think you have some valid concerns here. Here are a few things

  1. There is no official php 5.3 docker image and drupal 6 is end of life. I'm kind of torn on this but those facts might be worth justifying not supporting drupal 6.
  2. I do think adding some variance to the php versions is a good idea and the easiest thing to do there is just match up with the official docker php tags (see https://github.com/docker-library/docs/tree/master/php). Also it would be nice for users to peg to versions and not wake up one morning and say OMFG IM ON PHP 8.3 NOW!
  3. @RobLoach is there any specific reason we are using composer as the base image? I can def see how it would be useful to have composer in there but i think we can install most of the drush versions without it. Drush 7 is a question mark there but Drush 8 is preferred over drush 7 anyway.
  4. Does anyone know what the actual "officially supported" versions of drush are?
RobLoach commented 8 years ago

@danquah Thanks for hoping in! Really appreciate your input. Mike and I got on a call and talked about some possibilities around this. Would love your feedback on what we're thinking over at https://github.com/RobLoach/drush-docker/issues/28 .

RobLoach commented 8 years ago

https://github.com/RobLoach/drush-docker/issues/28