Skip to content

Commit 6d4c70f

Browse files
thyseusHerbert Maschke
andauthored
Allow usage in laravel 9.x (#195)
* Allow usage in laravel 9.x by setting version constraint of illuminate/collections to ^9.0 * use Utils::streamFor instead of stream_for Co-authored-by: Herbert Maschke <[email protected]>
1 parent 1f4e143 commit 6d4c70f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"guzzlehttp/guzzle": "~6.0|~7.0",
14-
"illuminate/collections": "^8.0"
14+
"illuminate/collections": "^8.0|^9.0"
1515
},
1616
"autoload": {
1717
"psr-4": {

src/Dropbox/DropboxFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __construct($filePath, $mode = self::MODE_READ)
8282
public static function createByStream($fileName, $resource, $mode = self::MODE_READ)
8383
{
8484
// create a new stream and set it to the dropbox file
85-
$stream = \GuzzleHttp\Psr7\stream_for($resource);
85+
$stream = \GuzzleHttp\Psr7\Utils::streamFor($resource);
8686
if (!$stream) {
8787
throw new DropboxClientException('Failed to create DropboxFile instance. Unable to open the given resource.');
8888
}
@@ -234,7 +234,7 @@ public function open()
234234
}
235235

236236
// Create a stream
237-
$this->stream = \GuzzleHttp\Psr7\stream_for(fopen($this->path, $this->mode));
237+
$this->stream = \GuzzleHttp\Psr7\Utils::streamFor(fopen($this->path, $this->mode));
238238

239239
// Unable to create stream
240240
if (!$this->stream) {

0 commit comments

Comments
 (0)