diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c4b3522e8..0c0fe8542e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: php-version: - - '7.4' - '8.0' - '8.1' - '8.2' diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d4118d62..f644ef0194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ backwards-incompatible changes that will affect existing usage. +## 12.0.0 - 2025-03-25 + +- Drop support for PHP 7.4 ([#937](https://github.com/php-curl-class/php-curl-class/pull/937)) + ## 11.1.0 - 2025-03-24 - Add methods like Curl::setGet() for each HTTP request method ([#936](https://github.com/php-curl-class/php-curl-class/pull/936)) diff --git a/README.md b/README.md index c5b8c66a22..159e7b52a6 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Installation instructions to use the `composer` command can be found on https:// ### 📋 Requirements -PHP Curl Class works with PHP 8.4, 8.3, 8.2, 8.1, 8.0, and 7.4. +PHP Curl Class works with PHP 8.4, 8.3, 8.2, 8.1, and 8.0. ### 🚀 Quick Start and Examples diff --git a/composer.json b/composer.json index 8eb824cf50..37e568954a 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.0", "ext-curl": "*" }, "require-dev": { diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index d429ab1d25..5959472aa7 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -6,7 +6,7 @@ class Curl extends BaseCurl { - public const VERSION = '11.1.0'; + public const VERSION = '12.0.0'; public const DEFAULT_TIMEOUT = 30; public $curl = null; diff --git a/tests/dockerfiles/php74/1_build.sh b/tests/dockerfiles/php74/1_build.sh deleted file mode 100755 index 3bd1da9fa3..0000000000 --- a/tests/dockerfiles/php74/1_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Build an image. -set -x -docker build --tag="php-curl-class/php74" . diff --git a/tests/dockerfiles/php74/2_start.sh b/tests/dockerfiles/php74/2_start.sh deleted file mode 100755 index 516a97ad76..0000000000 --- a/tests/dockerfiles/php74/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 "php74" || - docker run \ - --detach \ - --interactive \ - --mount "type=bind,src=${project_dir},dst=/data,readonly=true" \ - --name="php74" \ - --tty \ - "php-curl-class/php74" diff --git a/tests/dockerfiles/php74/3_test.sh b/tests/dockerfiles/php74/3_test.sh deleted file mode 100755 index 549b52dd40..0000000000 --- a/tests/dockerfiles/php74/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.4" && -( - [ ! -f "/tmp/.composer_updated" ] && - composer --no-interaction update && - touch "/tmp/.composer_updated" || - exit 0 -) && -bash "tests/run.sh" -END -) -set -x -docker exec --tty "php74" sh -c "${command}" diff --git a/tests/dockerfiles/php74/4_stop.sh b/tests/dockerfiles/php74/4_stop.sh deleted file mode 100755 index 6fb2e671ec..0000000000 --- a/tests/dockerfiles/php74/4_stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Stop container. -set -x -docker stop "php74" diff --git a/tests/dockerfiles/php74/Dockerfile b/tests/dockerfiles/php74/Dockerfile deleted file mode 100644 index 1efa876ce0..0000000000 --- a/tests/dockerfiles/php74/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM php:7.4-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/php74/attach.sh b/tests/dockerfiles/php74/attach.sh deleted file mode 100755 index 629773c984..0000000000 --- a/tests/dockerfiles/php74/attach.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Attach to running container. - -docker exec --interactive --tty "php74" bash -l diff --git a/tests/dockerfiles/php74/run.sh b/tests/dockerfiles/php74/run.sh deleted file mode 100755 index ced63cf365..0000000000 --- a/tests/dockerfiles/php74/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/php74/run_interactive.sh b/tests/dockerfiles/php74/run_interactive.sh deleted file mode 100755 index 3bc0c78289..0000000000 --- a/tests/dockerfiles/php74/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="php74" \ - --rm \ - --tty \ - "php-curl-class/php74" /bin/bash diff --git a/tests/psalm_7.4.xml b/tests/psalm_7.4.xml deleted file mode 100644 index 0f34f78f77..0000000000 --- a/tests/psalm_7.4.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/run_static_analysis_check_phpstan.sh b/tests/run_static_analysis_check_phpstan.sh index fbb6b6ba07..970a71d53f 100755 --- a/tests/run_static_analysis_check_phpstan.sh +++ b/tests/run_static_analysis_check_phpstan.sh @@ -10,7 +10,7 @@ pushd .. set -x -if [[ $(echo "${CI_PHP_VERSION} >= 7.4" | bc -l) -eq 1 ]]; then +if true; then phpstan_args=(--ansi --configuration="tests/phpstan.neon") diff --git a/tests/run_static_analysis_check_psalm.sh b/tests/run_static_analysis_check_psalm.sh index eb5870f2fb..2ed25a28ef 100755 --- a/tests/run_static_analysis_check_psalm.sh +++ b/tests/run_static_analysis_check_psalm.sh @@ -15,12 +15,7 @@ if [[ ! -f "vendor/bin/psalm" ]]; then warnings+=("Skipped running psalm static analysis check") else vendor/bin/psalm --version - - if [[ $(echo "${CI_PHP_VERSION} == 7.4" | bc -l) -eq 1 ]]; then - vendor/bin/psalm --config="tests/psalm_7.4.xml" - else - vendor/bin/psalm --config="tests/psalm.xml" - fi + vendor/bin/psalm --config="tests/psalm.xml" if [[ "${?}" -ne 0 ]]; then echo "❌ Error: psalm static analysis check failed"