From 147a9589112f4f796b836d20b75664d7a02e4b9b Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Wed, 21 Aug 2024 21:45:12 -0400 Subject: [PATCH] Drop support for PHP 7.2 --- .github/workflows/ci.yml | 1 - README.md | 2 +- composer.json | 2 +- tests/check_coding_standards.sh | 3 +-- tests/dockerfiles/php72/1_build.sh | 3 --- tests/dockerfiles/php72/2_start.sh | 15 -------------- tests/dockerfiles/php72/3_test.sh | 17 ---------------- tests/dockerfiles/php72/4_stop.sh | 3 --- tests/dockerfiles/php72/Dockerfile | 19 ------------------ tests/dockerfiles/php72/attach.sh | 3 --- tests/dockerfiles/php72/run.sh | 23 ---------------------- tests/dockerfiles/php72/run_interactive.sh | 14 ------------- 12 files changed, 3 insertions(+), 102 deletions(-) delete mode 100755 tests/dockerfiles/php72/1_build.sh delete mode 100755 tests/dockerfiles/php72/2_start.sh delete mode 100755 tests/dockerfiles/php72/3_test.sh delete mode 100755 tests/dockerfiles/php72/4_stop.sh delete mode 100644 tests/dockerfiles/php72/Dockerfile delete mode 100755 tests/dockerfiles/php72/attach.sh delete mode 100755 tests/dockerfiles/php72/run.sh delete mode 100755 tests/dockerfiles/php72/run_interactive.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36574ea87c..90adc16ebb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: php-version: - - '7.2' - '7.3' - '7.4' - '8.0' diff --git a/README.md b/README.md index 2f02af9cb6..0159980327 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Installation instructions to use the `composer` command can be found on https:// ### Requirements -PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, and 7.2. +PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, 7.4, and 7.3. ### Quick Start and Examples diff --git a/composer.json b/composer.json index 09a9008bc8..141175cc86 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": ">=7.2", + "php": ">=7.3", "ext-curl": "*" }, "require-dev": { diff --git a/tests/check_coding_standards.sh b/tests/check_coding_standards.sh index a217a2582f..51e7f89ee2 100755 --- a/tests/check_coding_standards.sh +++ b/tests/check_coding_standards.sh @@ -115,8 +115,7 @@ if [[ "${?}" -ne 0 ]]; then fi # Run PHP-CS-Fixer. -if [[ "${CI_PHP_VERSION}" == "7.2" ]]; then : -elif [[ "${CI_PHP_VERSION}" == "7.3" ]]; then : +if [[ "${CI_PHP_VERSION}" == "7.3" ]]; then : else vendor/bin/php-cs-fixer --version vendor/bin/php-cs-fixer fix --ansi --config="tests/.php-cs-fixer.php" --diff --dry-run diff --git a/tests/dockerfiles/php72/1_build.sh b/tests/dockerfiles/php72/1_build.sh deleted file mode 100755 index 408cfad5ef..0000000000 --- a/tests/dockerfiles/php72/1_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Build an image. -set -x -docker build --tag="php-curl-class/php72" . diff --git a/tests/dockerfiles/php72/2_start.sh b/tests/dockerfiles/php72/2_start.sh deleted file mode 100755 index af24a69cd5..0000000000 --- a/tests/dockerfiles/php72/2_start.sh +++ /dev/null @@ -1,15 +0,0 @@ -# Run image to create container. - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -set -x -cd "${SCRIPT_DIR}/../../.." -project_dir="${PWD}" - -docker start "php72" || - docker run \ - --detach \ - --interactive \ - --mount "type=bind,src=${project_dir},dst=/data,readonly=true" \ - --name="php72" \ - --tty \ - "php-curl-class/php72" diff --git a/tests/dockerfiles/php72/3_test.sh b/tests/dockerfiles/php72/3_test.sh deleted file mode 100755 index 3eec9f85d8..0000000000 --- a/tests/dockerfiles/php72/3_test.sh +++ /dev/null @@ -1,17 +0,0 @@ -# Run tests inside container. -command=$(cat <<-END -mkdir --parents "/tmp/php-curl-class" && -rsync --delete --exclude=".git" --exclude="vendor" --exclude="composer.lock" --links --recursive "/data/" "/tmp/php-curl-class/" && -cd "/tmp/php-curl-class" && -export CI_PHP_VERSION="7.2" && -( - [ ! -f "/tmp/.composer_updated" ] && - composer --no-interaction update && - touch "/tmp/.composer_updated" || - exit 0 -) && -bash "tests/run.sh" -END -) -set -x -docker exec --tty "php72" sh -c "${command}" diff --git a/tests/dockerfiles/php72/4_stop.sh b/tests/dockerfiles/php72/4_stop.sh deleted file mode 100755 index da8f31ab84..0000000000 --- a/tests/dockerfiles/php72/4_stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Stop container. -set -x -docker stop "php72" diff --git a/tests/dockerfiles/php72/Dockerfile b/tests/dockerfiles/php72/Dockerfile deleted file mode 100644 index b3c6ecb5b0..0000000000 --- a/tests/dockerfiles/php72/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM php:7.2-cli -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get --assume-yes --quiet update - -RUN apt-get --assume-yes --quiet install git && \ - apt-get --assume-yes --quiet install libpng-dev && \ - apt-get --assume-yes --quiet install rsync && \ - apt-get --assume-yes --quiet install zip - -RUN curl --silent --show-error "https://getcomposer.org/installer" | php && \ - mv "composer.phar" "/usr/local/bin/composer" && \ - composer global require --no-interaction "phpunit/phpunit" - -RUN docker-php-ext-configure gd && \ - docker-php-ext-install gd - -ENV PATH /root/.composer/vendor/bin:$PATH -CMD ["bash"] diff --git a/tests/dockerfiles/php72/attach.sh b/tests/dockerfiles/php72/attach.sh deleted file mode 100755 index cc6d36efd5..0000000000 --- a/tests/dockerfiles/php72/attach.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Attach to running container. - -docker exec --interactive --tty "php72" bash -l diff --git a/tests/dockerfiles/php72/run.sh b/tests/dockerfiles/php72/run.sh deleted file mode 100755 index ced63cf365..0000000000 --- a/tests/dockerfiles/php72/run.sh +++ /dev/null @@ -1,23 +0,0 @@ -bash "1_build.sh" -if [[ $? -ne 0 ]]; then - echo "Error: Build failed" - exit 1 -fi - -bash "2_start.sh" -if [[ $? -ne 0 ]]; then - echo "Error: Start failed" - exit 1 -fi - -bash "3_test.sh" -if [[ $? -ne 0 ]]; then - echo "Error: Test failed" - exit 1 -fi - -bash "4_stop.sh" -if [[ $? -ne 0 ]]; then - echo "Error: Stop failed" - exit 1 -fi diff --git a/tests/dockerfiles/php72/run_interactive.sh b/tests/dockerfiles/php72/run_interactive.sh deleted file mode 100755 index df7fe12bab..0000000000 --- a/tests/dockerfiles/php72/run_interactive.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Run image to create container and attach to it. - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -set -x -cd "${SCRIPT_DIR}/../../.." -project_dir="${PWD}" - -docker run \ - --interactive \ - --mount "type=bind,src=${project_dir},dst=/data,readonly=true" \ - --name="php72" \ - --rm \ - --tty \ - "php-curl-class/php72" /bin/bash