From 358594061cb28439d58d9726e90e9cb3df5ebd1b Mon Sep 17 00:00:00 2001 From: Rodolfo Berrios Date: Thu, 28 Mar 2019 20:27:10 -0300 Subject: [PATCH] Deprecated ArrayHelper, fixed - Fixed getter calls for obregonco\B2\File::getFilename and obregonco\B2\File::getFileId - yii\helpers\ArrayHelper::merge is not part of this package and it can be replaced by array_replace_recursive Both changes tested for login, upload and remove. --- src/Client.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Client.php b/src/Client.php index ccbf664..a583de1 100644 --- a/src/Client.php +++ b/src/Client.php @@ -9,7 +9,6 @@ use Illuminate\Cache\CacheManager; use Illuminate\Container\Container; use Illuminate\Filesystem\Filesystem; -use yii\helpers\ArrayHelper; class Client { @@ -542,8 +541,8 @@ protected function getFileIdFromBucketAndFileName($bucketName, $fileName) ]); foreach ($files as $file) { - if ($file->getName() === $fileName) { - return $file->getId(); + if ($file->getFileName() === $fileName) { + return $file->getFileId(); } } @@ -758,7 +757,7 @@ protected function request($method, $uri = null, array $options = [], $asJson = $headers['Authorization'] = $this->authToken; } - $options = ArrayHelper::merge([ + $options = array_replace_recursive([ 'headers' => $headers, ], $options);