diff --git a/src/handlers/UploadCommandHandler.php b/src/handlers/UploadCommandHandler.php index 68cdfe4..952431a 100644 --- a/src/handlers/UploadCommandHandler.php +++ b/src/handlers/UploadCommandHandler.php @@ -4,7 +4,7 @@ use frostealth\yii2\aws\s3\commands\UploadCommand; use frostealth\yii2\aws\s3\base\handlers\Handler; -use GuzzleHttp\Psr7; +use GuzzleHttp\Psr7\Utils; use Psr\Http\Message\StreamInterface; /** @@ -45,9 +45,9 @@ public function handle(UploadCommand $command) protected function sourceToStream($source): StreamInterface { if (is_string($source)) { - $source = Psr7\try_fopen($source, 'r+'); + $source = Utils::tryFopen($source, 'r+'); } - return Psr7\stream_for($source); + return Utils::streamFor($source); } }