Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Loosen the guzzlehttp/psr7 requirements to allow v2 #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"php-http/client-implementation": "^1.0",
"php-http/httplug": ">=1.0",
"php-http/discovery": "^1.0",
"guzzlehttp/psr7": "^1.4.2",
"guzzlehttp/psr7": "^1.4.2|^2.0",
"php-http/message": "^1.0"
},
"require-dev" : {
Expand Down
4 changes: 2 additions & 2 deletions src/DocumentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace TheCodingMachine\Gotenberg;

use GuzzleHttp\Psr7\LazyOpenStream;
use GuzzleHttp\Psr7\Stream;
use Psr\Http\Message\StreamInterface;
use function fopen;
use function fwrite;
use function GuzzleHttp\Psr7\stream_for;

final class DocumentFactory
{
Expand Down Expand Up @@ -36,6 +36,6 @@ public static function makeFromString(string $fileName, string $string): Documen
throw FilesystemException::createFromPhpError();
}

return new Document($fileName, stream_for($fileStream));
return new Document($fileName, new Stream($fileStream));
}
}