From 5ab8d006f3502c2184b82669da61bd3e01d61839 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 03:05:38 +0000 Subject: [PATCH 01/19] Bump idna from 3.4 to 3.7 in /scripts Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] --- scripts/make_release_requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/make_release_requirements.txt b/scripts/make_release_requirements.txt index f182cea5ce..9827d0f011 100644 --- a/scripts/make_release_requirements.txt +++ b/scripts/make_release_requirements.txt @@ -19,13 +19,13 @@ deprecated==1.2.14 gitdb==4.0.10 # via gitpython gitpython==3.1.43 - # via -r scripts/make_release_requirements.in -idna==3.4 + # via -r make_release_requirements.in +idna==3.7 # via requests pycparser==2.21 # via cffi pygithub==2.3.0 - # via -r scripts/make_release_requirements.in + # via -r make_release_requirements.in pyjwt[crypto]==2.8.0 # via pygithub pynacl==1.5.0 From 69ee1ff2bed12954663306ced13a24d89fccf5a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:03:47 +0000 Subject: [PATCH 02/19] Update pre-commit dependencies --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d781e6599..e781522a59 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ # $ pre-commit autoupdate repos: - repo: https://github.com/psf/black - rev: 24.3.0 + rev: 24.4.0 hooks: - id: black name: black From fe6ec233ae10bd2036fc61ac5942392fb4802ee4 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Sun, 21 Apr 2024 15:19:55 -0400 Subject: [PATCH 03/19] Set versioning-strategy to increase version requirements where possible (#866) --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1873f025b8..ff838cd55d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,8 @@ updates: directory: "/" schedule: interval: "daily" + versioning-strategy: "increase" + - package-ecosystem: "github-actions" directory: "/" schedule: @@ -12,7 +14,9 @@ updates: - "cleanup-no-release-required" - "dependencies" - "github_actions" + - package-ecosystem: "pip" directory: "/" schedule: interval: "daily" + versioning-strategy: "increase" From e39ee271de78cd006b50b8bd49a460f744c02183 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:03:38 +0000 Subject: [PATCH 04/19] Update pre-commit dependencies --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e781522a59..e159c2a13e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ # $ pre-commit autoupdate repos: - repo: https://github.com/psf/black - rev: 24.4.0 + rev: 24.4.1 hooks: - id: black name: black From e0f16878b35b547b051be1fcca4c69594c3b797e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:12:30 +0000 Subject: [PATCH 05/19] Bump dependabot/fetch-metadata from 2.0.0 to 2.1.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 6f62e26b81..3b9e87337e 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Dependabot metadata id: dependabot-metadata - uses: dependabot/fetch-metadata@v2.0.0 + uses: dependabot/fetch-metadata@v2.1.0 - name: Approve and label updates run: | From 711a8ec61bbdd4939d0482e52c3bc0c32863f573 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Thu, 25 Apr 2024 08:18:38 -0400 Subject: [PATCH 06/19] Add script to recreate requirements file --- scripts/make_release_recreate.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 scripts/make_release_recreate.sh diff --git a/scripts/make_release_recreate.sh b/scripts/make_release_recreate.sh new file mode 100755 index 0000000000..0d2892b87f --- /dev/null +++ b/scripts/make_release_recreate.sh @@ -0,0 +1,6 @@ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "${SCRIPT_DIR}" + +rm -v "make_release_requirements.txt" + +pip-compile --output-file="make_release_requirements.txt" "make_release_requirements.in" From 096b066e02899cababa45158a5d54e59a9424e67 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Thu, 25 Apr 2024 08:19:46 -0400 Subject: [PATCH 07/19] Update requirements --- scripts/make_release_requirements.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/make_release_requirements.txt b/scripts/make_release_requirements.txt index 9827d0f011..f314b8596e 100644 --- a/scripts/make_release_requirements.txt +++ b/scripts/make_release_requirements.txt @@ -4,25 +4,25 @@ # # pip-compile --output-file=make_release_requirements.txt make_release_requirements.in # -certifi==2023.7.22 +certifi==2024.2.2 # via requests -cffi==1.15.1 +cffi==1.16.0 # via # cryptography # pynacl -charset-normalizer==3.2.0 +charset-normalizer==3.3.2 # via requests -cryptography==42.0.4 +cryptography==42.0.5 # via pyjwt deprecated==1.2.14 # via pygithub -gitdb==4.0.10 +gitdb==4.0.11 # via gitpython gitpython==3.1.43 # via -r make_release_requirements.in idna==3.7 # via requests -pycparser==2.21 +pycparser==2.22 # via cffi pygithub==2.3.0 # via -r make_release_requirements.in @@ -32,13 +32,13 @@ pynacl==1.5.0 # via pygithub requests==2.31.0 # via pygithub -smmap==5.0.0 +smmap==5.0.1 # via gitdb -typing-extensions==4.8.0 +typing-extensions==4.11.0 # via pygithub -urllib3==2.0.7 +urllib3==2.2.1 # via # pygithub # requests -wrapt==1.15.0 +wrapt==1.16.0 # via deprecated From 403e8078354af24870477c31bea4596779e3828b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 18:03:56 +0000 Subject: [PATCH 08/19] Update pre-commit dependencies --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e159c2a13e..662752a36b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ # $ pre-commit autoupdate repos: - repo: https://github.com/psf/black - rev: 24.4.1 + rev: 24.4.2 hooks: - id: black name: black From 8ec8ce0c5679132f13caa102e30cc962273af447 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 06:19:31 +0000 Subject: [PATCH 09/19] --- updated-dependencies: - dependency-name: requests dependency-type: indirect ... Signed-off-by: dependabot[bot] --- scripts/make_release_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_release_requirements.txt b/scripts/make_release_requirements.txt index f314b8596e..8b0d28b091 100644 --- a/scripts/make_release_requirements.txt +++ b/scripts/make_release_requirements.txt @@ -30,7 +30,7 @@ pyjwt[crypto]==2.8.0 # via pygithub pynacl==1.5.0 # via pygithub -requests==2.31.0 +requests==2.32.0 # via pygithub smmap==5.0.1 # via gitdb From 44ae56cbf4e5bd4ae202bb25e37471185b92e9a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:04:23 +0000 Subject: [PATCH 10/19] Update pre-commit dependencies --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 662752a36b..105e642638 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: name: black entry: black - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + rev: 7.1.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort From db09020a457e279618f59745487bd97f2906ad35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 23:25:33 +0000 Subject: [PATCH 11/19] Bump urllib3 from 2.2.1 to 2.2.2 in /scripts Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.2.1...2.2.2) --- updated-dependencies: - dependency-name: urllib3 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- scripts/make_release_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_release_requirements.txt b/scripts/make_release_requirements.txt index 8b0d28b091..9148131983 100644 --- a/scripts/make_release_requirements.txt +++ b/scripts/make_release_requirements.txt @@ -36,7 +36,7 @@ smmap==5.0.1 # via gitdb typing-extensions==4.11.0 # via pygithub -urllib3==2.2.1 +urllib3==2.2.2 # via # pygithub # requests From c008f5eccb4edaff8245856fa143304b182dd017 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:16:13 +0000 Subject: [PATCH 12/19] Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 3b9e87337e..0182aa39d8 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Dependabot metadata id: dependabot-metadata - uses: dependabot/fetch-metadata@v2.1.0 + uses: dependabot/fetch-metadata@v2.2.0 - name: Approve and label updates run: | From e6699d4b25cd733bef3e04d1b816dd68bcce8401 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Jul 2024 01:55:45 +0000 Subject: [PATCH 13/19] Bump certifi from 2024.2.2 to 2024.7.4 in /scripts Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.7.4. - [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2024.07.04) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] --- scripts/make_release_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_release_requirements.txt b/scripts/make_release_requirements.txt index 9148131983..e325a4d70a 100644 --- a/scripts/make_release_requirements.txt +++ b/scripts/make_release_requirements.txt @@ -4,7 +4,7 @@ # # pip-compile --output-file=make_release_requirements.txt make_release_requirements.in # -certifi==2024.2.2 +certifi==2024.7.4 # via requests cffi==1.16.0 # via From c81a302c73258b8787fa3075ef92127e355d99ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:04:16 +0000 Subject: [PATCH 14/19] Update pre-commit dependencies --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 105e642638..0966ee676d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,13 +12,13 @@ # $ pre-commit autoupdate repos: - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black name: black entry: black - repo: https://github.com/pycqa/flake8 - rev: 7.1.0 + rev: 7.1.1 hooks: - id: flake8 - repo: https://github.com/pycqa/isort From e89823a1cbba75e3126ea132df74cbfa1e562d5d Mon Sep 17 00:00:00 2001 From: Konrad Abicht Date: Sat, 17 Aug 2024 04:14:48 +0200 Subject: [PATCH 15/19] TROUBLESHOOTING.md: use correct $curl properties (#878) It seems the current values don't account for the `$curl` instance. --- TROUBLESHOOTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 7d62a0cd3f..3b4cb9f2ed 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -48,12 +48,12 @@ $curl->get('https://www.example.com/'); echo 'error: ' . $curl->error . "\n"; echo 'errorCode: ' . $curl->errorCode . "\n"; echo 'errorMessage: ' . $curl->errorMessage . "\n"; -echo 'curlError: ' . $curlError . "\n"; -echo 'curlErrorCode: ' . $curlErrorCode . "\n"; -echo 'curlErrorMessage: ' . $curlErrorMessage . "\n"; -echo 'httpError: ' . $httpError . "\n"; -echo 'httpStatusCode: ' . $httpStatusCode . "\n"; -echo 'httpErrorMessage: ' . $httpErrorMessage . "\n"; +echo 'curlError: ' . $curl->error . "\n"; +echo 'curlErrorCode: ' . $curl->errorCode . "\n"; +echo 'curlErrorMessage: ' . $curl->errorMessage . "\n"; +echo 'httpError: ' . $curl->httpError . "\n"; +echo 'httpStatusCode: ' . $curl->httpStatusCode . "\n"; +echo 'httpErrorMessage: ' . $curl->httpErrorMessage . "\n"; echo 'requestHeaders:' . "\n"; var_dump($curl->requestHeaders); echo 'responseHeaders:' . "\n"; From 1d05ac3511a8902c669ac2ddf6dc7bc31d3c0de7 Mon Sep 17 00:00:00 2001 From: teandr Date: Sat, 17 Aug 2024 09:55:10 +0700 Subject: [PATCH 16/19] Add public method getActiveCurls (#871) --- src/Curl/MultiCurl.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Curl/MultiCurl.php b/src/Curl/MultiCurl.php index 362a8a4bcd..5f3d9f617c 100644 --- a/src/Curl/MultiCurl.php +++ b/src/Curl/MultiCurl.php @@ -942,4 +942,9 @@ private function waitUntilRequestQuotaAvailable() $this->currentRequestCount = 0; } + + public function getActiveCurls() + { + return $this->activeCurls; + } } From 63bddcd230da8ef948de2bb9a8d40a5fe87c6294 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Sat, 17 Aug 2024 09:15:46 -0400 Subject: [PATCH 17/19] Drop support for PHP 7.0 (#880) --- .github/workflows/ci.yml | 1 - README.md | 2 +- composer.json | 2 +- src/Curl/Curl.php | 4 ++-- tests/Helper.php | 4 ++-- tests/PHPCurlClass/PHPCurlClassTest.php | 6 ------ tests/check_coding_standards.sh | 6 ++---- tests/ci.sh | 16 --------------- tests/dockerfiles/php70/1_build.sh | 3 --- tests/dockerfiles/php70/2_start.sh | 15 -------------- tests/dockerfiles/php70/3_test.sh | 17 ---------------- tests/dockerfiles/php70/4_stop.sh | 3 --- tests/dockerfiles/php70/Dockerfile | 18 ----------------- tests/dockerfiles/php70/attach.sh | 3 --- tests/dockerfiles/php70/run.sh | 23 ---------------------- tests/dockerfiles/php70/run_interactive.sh | 14 ------------- tests/ruleset.xml | 3 --- tests/run.sh | 16 --------------- 18 files changed, 8 insertions(+), 148 deletions(-) delete mode 100755 tests/dockerfiles/php70/1_build.sh delete mode 100755 tests/dockerfiles/php70/2_start.sh delete mode 100755 tests/dockerfiles/php70/3_test.sh delete mode 100755 tests/dockerfiles/php70/4_stop.sh delete mode 100644 tests/dockerfiles/php70/Dockerfile delete mode 100755 tests/dockerfiles/php70/attach.sh delete mode 100755 tests/dockerfiles/php70/run.sh delete mode 100755 tests/dockerfiles/php70/run_interactive.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0513e41184..d8b5edc012 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: php-version: - - '7.0' - '7.1' - '7.2' - '7.3' diff --git a/README.md b/README.md index d825f7a9d3..3e454c8727 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, 7.2, 7.1, and 7.0. +PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, 7.2, and 7.1. ### Quick Start and Examples diff --git a/composer.json b/composer.json index 6641a2d64f..547b0916c2 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": ">=7.0", + "php": ">=7.1", "ext-curl": "*" }, "require-dev": { diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 04cbcd95c8..291040f2c2 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -6,8 +6,8 @@ class Curl extends BaseCurl { - const VERSION = '9.19.2'; - const DEFAULT_TIMEOUT = 30; + public const VERSION = '9.19.2'; + public const DEFAULT_TIMEOUT = 30; public $curl = null; public $id = null; diff --git a/tests/Helper.php b/tests/Helper.php index 50b6886cd2..55609a8148 100644 --- a/tests/Helper.php +++ b/tests/Helper.php @@ -8,8 +8,8 @@ class Test { - const TEST_URL = 'http://127.0.0.1:8000/'; - const ERROR_URL = 'http://1.2.3.4/'; + public const TEST_URL = 'http://127.0.0.1:8000/'; + public const ERROR_URL = 'http://1.2.3.4/'; public $message; diff --git a/tests/PHPCurlClass/PHPCurlClassTest.php b/tests/PHPCurlClass/PHPCurlClassTest.php index d2033ae9cf..857b019754 100644 --- a/tests/PHPCurlClass/PHPCurlClassTest.php +++ b/tests/PHPCurlClass/PHPCurlClassTest.php @@ -3401,12 +3401,6 @@ public function testRequestMethodSuccessiveSearchRequests() public function testMemoryLeak() { - // Skip memory leak test failing for PHP 7. - // "Failed asserting that 8192 is less than 1000." - if (getenv('CI_PHP_VERSION') === '7.0') { - $this->markTestSkipped(); - } - ob_start(); echo '['; for ($i = 0; $i < 10; $i++) { diff --git a/tests/check_coding_standards.sh b/tests/check_coding_standards.sh index 1ffc78b8c8..d4d0ae7ca3 100755 --- a/tests/check_coding_standards.sh +++ b/tests/check_coding_standards.sh @@ -93,8 +93,7 @@ if [[ ! -z "${elses}" ]]; then fi # Run PHP_CodeSniffer. -if [[ "${CI_PHP_VERSION}" == "7.0" ]]; then : -elif [[ "${CI_PHP_VERSION}" == "7.1" ]]; then : +if [[ "${CI_PHP_VERSION}" == "7.1" ]]; then : else # Determine which phpcs to use. @@ -121,8 +120,7 @@ else fi # Run PHP-CS-Fixer. -if [[ "${CI_PHP_VERSION}" == "7.0" ]]; then : -elif [[ "${CI_PHP_VERSION}" == "7.1" ]]; then : +if [[ "${CI_PHP_VERSION}" == "7.1" ]]; then : elif [[ "${CI_PHP_VERSION}" == "7.2" ]]; then : elif [[ "${CI_PHP_VERSION}" == "7.3" ]]; then : else diff --git a/tests/ci.sh b/tests/ci.sh index 726fda8fa8..6b5489cc1d 100755 --- a/tests/ci.sh +++ b/tests/ci.sh @@ -57,18 +57,6 @@ phpunit_v10_shim() { remove_expectWarning } -php_v7_0_shim() { - # -protected function setUp(): void - # +protected function setUp() - find='protected function setUp(): void' - replace='protected function setUp()' - if sed v < /dev/null 2> /dev/null; then - sed -i"" -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"* - else - sed -i "" -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"* - fi -} - set -x composer self-update @@ -132,10 +120,6 @@ elif [[ "${phpunit_version}" == "10."* ]]; then phpunit_args=" --display-incomplete --display-skipped --display-deprecations --display-errors --display-notices --display-warnings --fail-on-risky ${extra_args}" fi -if [[ "${CI_PHP_VERSION}" == "7.0" ]]; then - php_v7_0_shim -fi - # Run tests. "${phpunit_to_use}" --version "${phpunit_to_use}" \ diff --git a/tests/dockerfiles/php70/1_build.sh b/tests/dockerfiles/php70/1_build.sh deleted file mode 100755 index 54f767bd76..0000000000 --- a/tests/dockerfiles/php70/1_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Build an image. -set -x -docker build --tag="php-curl-class/php70" . diff --git a/tests/dockerfiles/php70/2_start.sh b/tests/dockerfiles/php70/2_start.sh deleted file mode 100755 index 15d1e503dc..0000000000 --- a/tests/dockerfiles/php70/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 "php70" || - docker run \ - --detach \ - --interactive \ - --mount "type=bind,src=${project_dir},dst=/data,readonly=true" \ - --name="php70" \ - --tty \ - "php-curl-class/php70" diff --git a/tests/dockerfiles/php70/3_test.sh b/tests/dockerfiles/php70/3_test.sh deleted file mode 100755 index 6ba37b2425..0000000000 --- a/tests/dockerfiles/php70/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.0" && -( - [ ! -f "/tmp/.composer_updated" ] && - composer --no-interaction update && - touch "/tmp/.composer_updated" || - exit 0 -) && -bash "tests/run.sh" -END -) -set -x -docker exec --tty "php70" sh -c "${command}" diff --git a/tests/dockerfiles/php70/4_stop.sh b/tests/dockerfiles/php70/4_stop.sh deleted file mode 100755 index 31563f4c7f..0000000000 --- a/tests/dockerfiles/php70/4_stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Stop container. -set -x -docker stop "php70" diff --git a/tests/dockerfiles/php70/Dockerfile b/tests/dockerfiles/php70/Dockerfile deleted file mode 100644 index 449fb18fb0..0000000000 --- a/tests/dockerfiles/php70/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM php:7.0-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 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/php70/attach.sh b/tests/dockerfiles/php70/attach.sh deleted file mode 100755 index 2a09b80a48..0000000000 --- a/tests/dockerfiles/php70/attach.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Attach to running container. - -docker exec --interactive --tty "php70" bash -l diff --git a/tests/dockerfiles/php70/run.sh b/tests/dockerfiles/php70/run.sh deleted file mode 100755 index ced63cf365..0000000000 --- a/tests/dockerfiles/php70/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/php70/run_interactive.sh b/tests/dockerfiles/php70/run_interactive.sh deleted file mode 100755 index a089e63516..0000000000 --- a/tests/dockerfiles/php70/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="php70" \ - --rm \ - --tty \ - "php-curl-class/php70" /bin/bash diff --git a/tests/ruleset.xml b/tests/ruleset.xml index 1886bc4fac..a52783b81d 100644 --- a/tests/ruleset.xml +++ b/tests/ruleset.xml @@ -13,9 +13,6 @@ - - - diff --git a/tests/run.sh b/tests/run.sh index c3472fede7..ca4c2ca7f1 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -57,18 +57,6 @@ phpunit_v10_shim() { remove_expectWarning } -php_v7_0_shim() { - # -protected function setUp(): void - # +protected function setUp() - find='protected function setUp(): void' - replace='protected function setUp()' - if sed v < /dev/null 2> /dev/null; then - sed -i"" -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"* - else - sed -i "" -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"* - fi -} - set -x # Use composer's phpunit and phpcs by adding composer bin directory to the path environment variable. @@ -129,10 +117,6 @@ elif [[ "${phpunit_version}" == "10."* ]]; then phpunit_args=" --display-incomplete --display-skipped --display-deprecations --display-errors --display-notices --display-warnings --fail-on-risky ${extra_args}" fi -if [[ "${CI_PHP_VERSION}" == "7.0" ]]; then - php_v7_0_shim -fi - # Run tests. "${phpunit_to_use}" --version "${phpunit_to_use}" \ From fc52d8db516b0a3a41bee3d45e2bc6fce26688e0 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Sat, 17 Aug 2024 09:45:18 -0400 Subject: [PATCH 18/19] Bump min psalm version (#879) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 547b0916c2..ea8d153ac0 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "phpcsstandards/phpcsutils": "@alpha", "phpunit/phpunit": "*", "squizlabs/php_codesniffer": "*", - "vimeo/psalm": ">=0.3.63" + "vimeo/psalm": ">=2" }, "suggest": { "ext-mbstring": "*" From f08eb12db8771b16cc89fc0ea5adc20969ad1694 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:03:54 +0000 Subject: [PATCH 19/19] =?UTF-8?q?Bump=20version:=209.19.2=20=E2=86=92=2010?= =?UTF-8?q?.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ src/Curl/Curl.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e2e43fe7a..b52061cc90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ backwards-incompatible changes that will affect existing usage. +## 10.0.0 - 2024-08-20 + +- Drop support for PHP 7.0 ([#880](https://github.com/php-curl-class/php-curl-class/pull/880)) +- Add public method getActiveCurls ([#871](https://github.com/php-curl-class/php-curl-class/pull/871)) + ## 9.19.2 - 2024-04-09 - Fix CI: Use nullable type declaration ([#859](https://github.com/php-curl-class/php-curl-class/pull/859)) diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 291040f2c2..5022be0783 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -6,7 +6,7 @@ class Curl extends BaseCurl { - public const VERSION = '9.19.2'; + public const VERSION = '10.0.0'; public const DEFAULT_TIMEOUT = 30; public $curl = null;