1
0

replaced 2 legacy calls

This commit is contained in:
2024-11-21 14:29:30 +01:00
parent fd7bb53511
commit 474e403531

View File

@@ -5,6 +5,7 @@ namespace frostealth\yii2\aws\s3\handlers;
use frostealth\yii2\aws\s3\commands\UploadCommand; use frostealth\yii2\aws\s3\commands\UploadCommand;
use frostealth\yii2\aws\s3\base\handlers\Handler; use frostealth\yii2\aws\s3\base\handlers\Handler;
use GuzzleHttp\Psr7; use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\StreamInterface; use Psr\Http\Message\StreamInterface;
/** /**
@@ -45,9 +46,9 @@ final class UploadCommandHandler extends Handler
protected function sourceToStream($source): StreamInterface protected function sourceToStream($source): StreamInterface
{ {
if (is_string($source)) { if (is_string($source)) {
$source = Psr7\try_fopen($source, 'r+'); $source = Utils::tryFopen($source, 'r+');
} }
return Psr7\stream_for($source); return Psr7\Utils::streamFor($source);
} }
} }