Skip to content

Commit

Permalink
feat: remove code for unsupported version v5 of Guzzle
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
  • Loading branch information
ziegenberg committed May 16, 2024
1 parent 9b6ef49 commit 6ec4a68
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 551 deletions.
7 changes: 7 additions & 0 deletions .changes/nextrelease/remove-guzzlev5-support.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "enhancement",
"category": "Handler",
"description": "Remove code for unsupported version v5 of Guzzle"
}
]
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ we ask the same of all community contributions as well:
### Changelog Documents

A changelog document is a small JSON blob placed in the `.changes/nextrelease`
folder. It should be named a clearly and uniquely, akin to a branch name. It
folder. It should be named clearly and uniquely, akin to a branch name. It
consists of a type, category, and description as follows:

```json
Expand Down
211 changes: 0 additions & 211 deletions src/Handler/GuzzleV5/GuzzleHandler.php

This file was deleted.

24 changes: 0 additions & 24 deletions src/Handler/GuzzleV5/GuzzleStream.php

This file was deleted.

34 changes: 0 additions & 34 deletions src/Handler/GuzzleV5/PsrStream.php

This file was deleted.

13 changes: 0 additions & 13 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,6 @@ function default_http_handler()
return new \Aws\Handler\GuzzleV6\GuzzleHandler();
}

// If Guzzle 5 installed
if ($version === 5) {
return new \Aws\Handler\GuzzleV5\GuzzleHandler();
}

throw new \RuntimeException('Unknown Guzzle version: ' . $version);
}

Expand All @@ -300,11 +295,6 @@ function default_user_agent()
return \GuzzleHttp\default_user_agent();
}

// If Guzzle 5 installed
if ($version === 5) {
return \GuzzleHttp\Client::getDefaultUserAgent();
}

throw new \RuntimeException('Unknown Guzzle version: ' . $version);
}

Expand All @@ -327,9 +317,6 @@ function guzzle_major_version()
if ($version[0] === '6') {
return $cache = 6;
}
if ($version[0] === '5') {
return $cache = 5;
}
} elseif (defined('\GuzzleHttp\ClientInterface::MAJOR_VERSION')) {
return $cache = ClientInterface::MAJOR_VERSION;
}
Expand Down
Loading

0 comments on commit 6ec4a68

Please sign in to comment.