Skip to content

Commit ca37693

Browse files
authored
Merge pull request laradock#1382 from desaroger/php-72-pr
Add PHP 7.2 support and fix issues on 5.6-7.0-7.1 versions
2 parents 13f55ef + 227bc37 commit ca37693

14 files changed

Lines changed: 3180 additions & 8 deletions

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ env:
1010
- PHP_VERSION=56 BUILD_SERVICE=workspace
1111
- PHP_VERSION=70 BUILD_SERVICE=workspace
1212
- PHP_VERSION=71 BUILD_SERVICE=workspace
13+
- PHP_VERSION=72 BUILD_SERVICE=workspace
1314

1415
- PHP_VERSION=56 BUILD_SERVICE=php-fpm
1516
- PHP_VERSION=70 BUILD_SERVICE=php-fpm
1617
- PHP_VERSION=71 BUILD_SERVICE=php-fpm
18+
- PHP_VERSION=72 BUILD_SERVICE=php-fpm
1719

1820
- PHP_VERSION=hhvm BUILD_SERVICE=hhvm
1921

2022
# - PHP_VERSION=56 BUILD_SERVICE=php-worker
2123
- PHP_VERSION=70 BUILD_SERVICE=php-worker
2224
- PHP_VERSION=71 BUILD_SERVICE=php-worker
25+
- PHP_VERSION=72 BUILD_SERVICE=php-worker
2326

2427
- PHP_VERSION=56 BUILD_SERVICE=mssql
2528
- PHP_VERSION=70 BUILD_SERVICE=mssql

env-example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
APPLICATION=../
99

1010
### PHP Version ########################################################################################################
11-
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 71 - 70 - 56
11+
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 72 - 71 - 70 - 56
1212

13-
PHP_VERSION=71
13+
PHP_VERSION=72
1414

1515
### PHP Interpreter ####################################################################################################
1616
# Select the PHP Interpreter. Accepted values: hhvm - php-fpm

php-fpm/Dockerfile-56

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ ARG INSTALL_GMP=false
177177
RUN if [ ${INSTALL_GMP} = true ]; then \
178178
# Install the GMP extension
179179
apt-get update -yqq && \
180-
apt-get install -y libgmp-dev && \
180+
apt-get install -y libgmp-dev && \
181+
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h && \
181182
docker-php-ext-install gmp \
182183
;fi
183184

@@ -324,11 +325,17 @@ ARG INSTALL_IMAGEMAGICK=false
324325
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
325326
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
326327
apt-get update -y && \
327-
apt-get install -y libmagickwand-dev imagemagick && \
328+
apt-get install -y libmagickwand-dev imagemagick && \
328329
pecl install imagick && \
329330
docker-php-ext-enable imagick \
330331
;fi
331332

333+
#####################################
334+
# Check PHP version:
335+
#####################################
336+
337+
RUN php -v | head -n 1 | grep -q "PHP 5.6."
338+
332339
#
333340
#--------------------------------------------------------------------------
334341
# Final Touch

php-fpm/Dockerfile-70

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
351351
docker-php-ext-enable imagick \
352352
;fi
353353

354+
#####################################
355+
# Check PHP version:
356+
#####################################
357+
358+
RUN php -v | head -n 1 | grep -q "PHP 7.0."
359+
354360
#
355361
#--------------------------------------------------------------------------
356362
# Final Touch

php-fpm/Dockerfile-71

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
357357
docker-php-ext-enable imagick \
358358
;fi
359359

360+
#####################################
361+
# Check PHP version:
362+
#####################################
363+
364+
RUN php -v | head -n 1 | grep -q "PHP 7.1."
365+
360366
#
361367
#--------------------------------------------------------------------------
362368
# Final Touch

0 commit comments

Comments
 (0)