Skip to content

Commit

Permalink
Switch Drupal 7 PHP version to 7
Browse files Browse the repository at this point in the history
  • Loading branch information
skyred committed Jul 11, 2016
1 parent 9266479 commit 41970d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 7/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# from https://www.drupal.org/requirements/php#drupalversions
FROM php:5.6-apache
FROM php:7.0-apache

RUN a2enmod rewrite

Expand Down
2 changes: 1 addition & 1 deletion 7/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# from https://www.drupal.org/requirements/php#drupalversions
FROM php:5.6-fpm
FROM php:7.0-fpm

# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
Expand Down

5 comments on commit 41970d6

@karelbemelmans
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guys, this is NOT cool to just do that for Drupal 7 without making a new tag for it. Upgrading from PHP 5.6 to 7.0 has a lot of impact on pecl modules (e.g. the memcached one that broke my images today).

I suggest you role back this PHP version upgrade.

@skyred
Copy link
Contributor Author

@skyred skyred commented on 41970d6 Jul 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Memcached support isn't in this image. But, I am sorry that this caused you trouble. For memecached support with PHP 7, you can do it with a few lines, for example:

https://github.com/INsReady/php-fpm-for-cms/blob/master/7.0/Dockerfile#L10

@karelbemelmans
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are ways to fix this, but my point is that just upgrading from PHP 5.6 to PHP 7 for a Drupal 7 site is not something you should do lightly. There are also a lot of Drupal 7 contrib modules on drupal.org out there that use PHP features that have been deprecated in PHP 7, and those will break your sites now.

@skyred
Copy link
Contributor Author

@skyred skyred commented on 41970d6 Jul 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are also a lot of Drupal 7 contrib modules on drupal.org out there that use PHP features that have been deprecated in PHP 7, and those will break your sites now.

This discussion has already been done, and belongs on the Drupal.org side:
https://www.drupal.org/requirements/php and https://www.drupal.org/node/2656548

@jonpugh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drupal 7 actually supports PHP 5.3 - 5.7 as well as 7.0.

A tag for each PHP version would be nice. Many projects I have worked on won't work on php7 without rewrites. Without tags, I'm forced to copy your Dockerfile at https://github.com/docker-library/drupal/blob/bee08efba505b740a14d68254d6e51af7ab2f3ea/7/Dockerfile#L6-9 into my own.

It would be very helpful if you could add tags for php5 containers.

I submitted an issue about it: #95

Please sign in to comment.