diff --git a/composer.json b/composer.json index 2d355bb3a..f8d37548c 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "php": ">=7.1.0" }, "require-dev": { - "guzzlehttp/guzzle": "7.11.1", + "guzzlehttp/guzzle": "^8.0", "phpunit/phpunit": "9.6.34", "friendsofphp/php-cs-fixer": "3.94.2" }, diff --git a/composer.lock b/composer.lock index 415a322cc..060578bdb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ffe8f3c3b2e3153b10ef546ccdd4a5c1", + "content-hash": "cf6335601a89e04d46ddcb0a5f22c5b8", "packages": [], "packages-dev": [ { @@ -577,26 +577,27 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.11.1", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "5af96f374e0ab4ebd747b8310888c99d3adb0a8c" + "reference": "643356760d8efce521dfce2587d63fd9d0c70d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/5af96f374e0ab4ebd747b8310888c99d3adb0a8c", - "reference": "5af96f374e0ab4ebd747b8310888c99d3adb0a8c", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/643356760d8efce521dfce2587d63fd9d0c70d72", + "reference": "643356760d8efce521dfce2587d63fd9d0c70d72", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^2.5", - "guzzlehttp/psr7": "^2.11", - "php": "^7.2.5 || ^8.0", + "guzzlehttp/promises": "^3.0", + "guzzlehttp/psr7": "^3.0", + "php": "^7.4 || ^8.0", "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0", - "symfony/polyfill-php80": "^1.24" + "psr/http-factory": "^1.0", + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php82": "^1.27" }, "provide": { "psr/http-client-implementation": "1.0" @@ -604,10 +605,10 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", - "guzzlehttp/test-server": "^0.5", + "guzzle/client-integration-tests": "4.0.1", + "guzzlehttp/test-server": "^1.0@dev", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.52 || ^9.6.34", + "phpunit/phpunit": "^9.6.34", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -623,9 +624,6 @@ } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" } @@ -685,7 +683,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.11.1" + "source": "https://github.com/guzzle/guzzle/tree/8.0.0" }, "funding": [ { @@ -701,29 +699,28 @@ "type": "tidelift" } ], - "time": "2026-06-07T22:54:06+00:00" + "time": "2026-07-20T13:53:10+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.5.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "4360e982f87f5f258bf872d094647791db2f4c8e" + "reference": "d961a21387cd680ec1cc6f52aa1fdcef33105e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/4360e982f87f5f258bf872d094647791db2f4c8e", - "reference": "4360e982f87f5f258bf872d094647791db2f4c8e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/d961a21387cd680ec1cc6f52aa1fdcef33105e24", + "reference": "d961a21387cd680ec1cc6f52aa1fdcef33105e24", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.52 || ^9.6.34" + "phpunit/phpunit": "^9.6.34" }, "type": "library", "extra": { @@ -769,7 +766,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.5.0" + "source": "https://github.com/guzzle/promises/tree/3.0.0" }, "funding": [ { @@ -785,39 +782,39 @@ "type": "tidelift" } ], - "time": "2026-06-02T12:23:43+00:00" + "time": "2026-07-20T13:44:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.11.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "bbb5e61349fa5cb822b3e87842b951088b76b81f" + "reference": "b094ded77ee97a6027ad6cf0e8c7b9f88381814c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/bbb5e61349fa5cb822b3e87842b951088b76b81f", - "reference": "bbb5e61349fa5cb822b3e87842b951088b76b81f", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b094ded77ee97a6027ad6cf0e8c7b9f88381814c", + "reference": "b094ded77ee97a6027ad6cf0e8c7b9f88381814c", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0", - "symfony/polyfill-php80": "^1.24" + "php": "^7.4 || ^8.0", + "psr/http-factory": "^1.1", + "psr/http-message": "^2.0", + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php82": "^1.27" }, "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "psr/http-factory-implementation": "1.1", + "psr/http-message-implementation": "2.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "1.1.0", "jshttp/mime-db": "1.54.0.1", - "phpunit/phpunit": "^8.5.52 || ^9.6.34" + "php-http/psr7-integration-tests": "^1.5.1", + "phpunit/phpunit": "^9.6.34" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -888,7 +885,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.11.0" + "source": "https://github.com/guzzle/psr7/tree/3.0.0" }, "funding": [ { @@ -904,7 +901,7 @@ "type": "tidelift" } ], - "time": "2026-06-02T12:30:48+00:00" + "time": "2026-07-20T13:48:31+00:00" }, { "name": "myclabs/deep-copy", @@ -1885,50 +1882,6 @@ }, "time": "2024-09-11T13:17:53+00:00" }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, { "name": "react/cache", "version": "v1.2.0", @@ -4508,6 +4461,86 @@ ], "time": "2026-05-26T12:45:58+00:00" }, + { + "name": "symfony/polyfill-php82", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php82.git", + "reference": "002dc0cfe5fd4ed6033d48f27d4f19a486c4b04b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/002dc0cfe5fd4ed6033d48f27d4f19a486c4b04b", + "reference": "002dc0cfe5fd4ed6033d48f27d4f19a486c4b04b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php82\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php82/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T12:45:58+00:00" + }, { "name": "symfony/polyfill-php84", "version": "v1.38.1", diff --git a/tests/Twilio/Unit/Http/GuzzleClientTest.php b/tests/Twilio/Unit/Http/GuzzleClientTest.php index 470862fe4..0ffe37bf3 100644 --- a/tests/Twilio/Unit/Http/GuzzleClientTest.php +++ b/tests/Twilio/Unit/Http/GuzzleClientTest.php @@ -116,7 +116,7 @@ public function testPostMethodMultipart(): void { $request = $this->mockHandler->getLastRequest(); $this->assertSame('POST', $request->getMethod()); - $this->assertStringMatchesFormat("--%s\r\nContent-Disposition: form-data; name=\"key\"\r\nContent-Length: 5\r\n\r\nvalue\r\n--%s\r\nContent-Disposition: form-data; name=\"fileAsPath\"; filename=\"file.txt\"\r\nContent-Length: 14\r\nContent-Type: text/plain\r\n\r\nMock contents\n\r\n--%s\r\nContent-Disposition: form-data; name=\"fileAsResource\"; filename=\"file.txt\"\r\nContent-Length: 14\r\nContent-Type: text/plain\r\n\r\nMock contents\n\r\n--%s\r\nContent-Disposition: form-data; name=\"fileAsString\"; filename=\"file.txt\"\r\nContent-Length: 14\r\nContent-Type: text/plain\r\n\r\nMock contents\n\r\n--%s\r\nContent-Disposition: form-data; name=\"fileAsStream\"; filename=\"file.txt\"\r\nContent-Length: 14\r\nContent-Type: text/plain\r\n\r\nMock contents\n\r\n--%s--\r\n", $request->getBody()->getContents()); + $this->assertStringMatchesFormat("--%s\nContent-Disposition: form-data; name=\"key\"\n\nvalue\n--%s\nContent-Disposition: form-data; name=\"fileAsPath\"; filename=\"file.txt\"\nContent-Type: text/plain\n\nMock contents\n\n--%s\nContent-Disposition: form-data; name=\"fileAsResource\"; filename=\"file.txt\"\nContent-Type: text/plain\n\nMock contents\n\n--%s\nContent-Disposition: form-data; name=\"fileAsString\"; filename=\"file.txt\"\nContent-Type: text/plain\n\nMock contents\n\n--%s\nContent-Disposition: form-data; name=\"fileAsStream\"; filename=\"file.txt\"\nContent-Type: text/plain\n\nMock contents\n\n--%s--\n", $request->getBody()->getContents()); $this->assertStringMatchesFormat('multipart/form-data; boundary=%s', $request->getHeaderLine('Content-Type')); }