Browse Source

Bump required PHP to 7.1

Dariusz Ruminski 4 years ago
parent
commit
21e034c37d

+ 4 - 7
.github/workflows/ci.yml

@@ -11,27 +11,24 @@ jobs:
       matrix:
         include:
           - operating-system: 'ubuntu-20.04'
-            php-version: '5.6'
+            php-version: '7.1'
             composer-flags: '--prefer-stable --prefer-lowest' # should be checked on lowest supported PHP version
 
           - operating-system: 'ubuntu-20.04'
-            php-version: '7.0'
+            php-version: '7.2'
             job-description: 'with Sf ^3'
             execute-flex-with-symfony-version: '^3' # Explicit check for Sf 3.x compatibility
 
           - operating-system: 'ubuntu-20.04'
-            php-version: '7.1'
+            php-version: '7.3'
             job-description: 'with Sf ^4'
             execute-flex-with-symfony-version: '^4' # Explicit check for Sf 4.x compatibility
 
           - operating-system: 'ubuntu-20.04'
-            php-version: '7.2'
+            php-version: '7.4'
             job-description: 'with Sf ^5'
             execute-flex-with-symfony-version: '^5' # Explicit check for Sf 5.x compatibility
 
-          - operating-system: 'ubuntu-20.04'
-            php-version: '7.3'
-
           - operating-system: 'ubuntu-20.04'
             php-version: '7.4'
             job-description: 'with calculating code coverage'

+ 1 - 1
composer.json

@@ -14,7 +14,7 @@
         }
     ],
     "require": {
-        "php": "^5.6 || ^7.0 || ^8.0",
+        "php": "^7.1 || ^8.0",
         "ext-json": "*",
         "ext-tokenizer": "*",
         "composer/semver": "^1.4 || ^2.0 || ^3.0",

+ 1 - 1
dev-tools/build.sh

@@ -2,7 +2,7 @@
 set -eu
 
 # ensure that deps will work on lowest supported PHP version
-composer config platform.php 2> /dev/null || composer config platform.php 5.6.0
+composer config platform.php 2> /dev/null || composer config platform.php 7.1.0
 
 # require suggested packages
 composer require --no-update symfony/polyfill-mbstring

+ 1 - 5
docker-compose.override.yaml.dist

@@ -1,7 +1,7 @@
 version: '3.8'
 
 services:
-  php-5.6: &php
+  php-7.1: &php
     build:
       args:
         DOCKER_USER_ID: 1000 # replace with your user id (most likely 1000)
@@ -11,10 +11,6 @@ services:
       # Required for Docker Linux until natively supported.
       # See https://github.com/docker/for-linux/issues/264
       host.docker.internal: 172.17.0.1
-  php-7.0:
-    <<: *php
-  php-7.1:
-    <<: *php
   php-7.2:
     <<: *php
   php-7.3:

+ 2 - 8
docker-compose.yaml

@@ -1,20 +1,14 @@
 version: '3.8'
 
 services:
-  php-5.6: &php
-    build: docker/php-5.6
+  php-7.1: &php
+    build: docker/php-7.1
     working_dir: /app
     volumes:
       - .:/app
     environment:
       PHP_IDE_CONFIG: serverName=php-cs-fixer
       PHP_CS_FIXER_ALLOW_XDEBUG: 1
-  php-7.0:
-    <<: *php
-    build: docker/php-7.0
-  php-7.1:
-    <<: *php
-    build: docker/php-7.1
   php-7.2:
     <<: *php
     build: docker/php-7.2

+ 0 - 27
docker/php-5.6/Dockerfile

@@ -1,27 +0,0 @@
-FROM php:5.6-cli-alpine3.8
-
-ARG DOCKER_USER_ID
-ARG DOCKER_GROUP_ID
-
-RUN if ! getent group "${DOCKER_GROUP_ID}" > /dev/null; \
-    then addgroup -S -g "${DOCKER_GROUP_ID}" devs; \
-  fi \
-  && if ! getent passwd "${DOCKER_USER_ID}" > /dev/null; \
-    then adduser -S -u "${DOCKER_USER_ID}" -G "$(getent group "${DOCKER_GROUP_ID}" | awk -F: '{printf $1}')" dev; \
-  fi \
-  && apk add --no-cache git libxml2-dev openssh-client \
-  && apk add --no-cache --virtual .build-deps autoconf g++ make \
-  # xdebug
-  && pecl install xdebug-2.5.5 \
-  && docker-php-ext-enable xdebug \
-  # composer
-  && curl --output composer-setup.php https://getcomposer.org/installer \
-  && php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
-  && rm composer-setup.php \
-  # xdebug command
-  && curl --location --output /usr/local/bin/xdebug https://github.com/julienfalque/xdebug/releases/download/v1.1.0/xdebug \
-  && chmod +x /usr/local/bin/xdebug \
-  # clean up
-  && apk del .build-deps
-
-COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

+ 0 - 5
docker/php-5.6/xdebug.ini

@@ -1,5 +0,0 @@
-;zend_extension=xdebug.so
-xdebug.remote_autostart=1
-xdebug.remote_enable=1
-xdebug.remote_host=host.docker.internal
-xdebug.remote_port=9003

+ 0 - 27
docker/php-7.0/Dockerfile

@@ -1,27 +0,0 @@
-FROM php:7.0-cli-alpine3.7
-
-ARG DOCKER_USER_ID
-ARG DOCKER_GROUP_ID
-
-RUN if ! getent group "${DOCKER_GROUP_ID}" > /dev/null; \
-    then addgroup -S -g "${DOCKER_GROUP_ID}" devs; \
-  fi \
-  && if ! getent passwd "${DOCKER_USER_ID}" > /dev/null; \
-    then adduser -S -u "${DOCKER_USER_ID}" -G "$(getent group "${DOCKER_GROUP_ID}" | awk -F: '{printf $1}')" dev; \
-  fi \
-  && apk add --no-cache git libxml2-dev openssh-client \
-  && apk add --no-cache --virtual .build-deps autoconf g++ make \
-  # xdebug
-  && pecl install xdebug-2.7.2 \
-  && docker-php-ext-enable xdebug \
-  # composer
-  && curl --output composer-setup.php https://getcomposer.org/installer \
-  && php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
-  && rm composer-setup.php \
-  # xdebug command
-  && curl --location --output /usr/local/bin/xdebug https://github.com/julienfalque/xdebug/releases/download/v1.1.0/xdebug \
-  && chmod +x /usr/local/bin/xdebug \
-  # clean up
-  && apk del .build-deps
-
-COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

+ 0 - 5
docker/php-7.0/xdebug.ini

@@ -1,5 +0,0 @@
-;zend_extension=xdebug.so
-xdebug.remote_autostart=1
-xdebug.remote_enable=1
-xdebug.remote_host=host.docker.internal
-xdebug.remote_port=9003

+ 2 - 2
php-cs-fixer

@@ -24,10 +24,10 @@ if (defined('HHVM_VERSION_ID')) {
 } elseif (
     !defined('PHP_VERSION_ID')
     || \PHP_VERSION_ID === 80000
-    || \PHP_VERSION_ID < 50600
+    || \PHP_VERSION_ID < 70100
     || \PHP_VERSION_ID >= 80100
 ) {
-    fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 8.0.*.\n");
+    fwrite(STDERR, "PHP needs to be a minimum version of PHP 7.1.0 and maximum version of PHP 8.0.*.\n");
     fwrite(STDERR, 'Current PHP version: '.PHP_VERSION.".\n");
 
     if (defined('PHP_VERSION_ID') && \PHP_VERSION_ID === 80000) {

Some files were not shown because too many files changed in this diff