Skip to content

Commit

Permalink
Update guzzle and dev packages (#58)
Browse files Browse the repository at this point in the history
* Bump guzzle to 7

* Bump dev packages

* Migrate phpunit to 10.x
  • Loading branch information
MarcHagen authored Feb 22, 2024
1 parent 5a69be2 commit 231da6c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/extras/
/vendor/
.phpunit.result.cache
/.phpunit.cache/
composer.lock
composer.phar
phpunit.xml
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"require": {
"php": "^8.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.2"
"guzzlehttp/guzzle": "^7.8"
},
"require-dev": {
"mockery/mockery": "^1.0",
"phpstan/phpstan": "^0.12.32",
"phpunit/phpunit": "^7.0|^8.0|^9.0"
"mockery/mockery": "^1.6",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
14 changes: 6 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
>
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">tests/</directory>
<directory>tests/</directory>
<exclude>tests/database/factories/</exclude>
</testsuite>
</testsuites>
Expand Down
4 changes: 2 additions & 2 deletions src/HttpClient/GuzzleHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

use Cog\Contracts\YouTrack\Rest\HttpClient\Exceptions\HttpClientException;
use Cog\Contracts\YouTrack\Rest\HttpClient\HttpClient as HttpClientInterface;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Utils;
use Psr\Http\Message\ResponseInterface;
use Throwable;

Expand Down Expand Up @@ -86,7 +86,7 @@ private function buildOptions(array $options): array
*/
private function appendUserAgent(array $options): array
{
$defaultAgent = 'GuzzleHttp/' . Client::VERSION;
$defaultAgent = Utils::defaultUserAgent();
if (extension_loaded('curl') && function_exists('curl_version')) {
$curlVersion = \curl_version();
if (\is_array($curlVersion)) {
Expand Down

0 comments on commit 231da6c

Please sign in to comment.