From 5ade54b4a4102ff228f47e9dbd6a62149fe98fa3 Mon Sep 17 00:00:00 2001 From: JhaoDa Date: Sun, 23 Aug 2020 19:15:01 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B2=D1=8B=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BC=D0=B8=D0=BD=D0=B8=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D1=8F=20Laravel?= =?UTF-8?q?=20=D0=B4=D0=BE=205.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + composer.json | 4 ++-- src/LaravelServiceProvider.php | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 30914f5..fc4b036 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ composer require appwilio/russianpost-sdk ``` При использовании фреймворка [Laravel](https://laravel.com/) SDK автоматически регистрирует доступные сервисы. +> Минимальная версия Laravel — 5.8. ## Логирование diff --git a/composer.json b/composer.json index 7f6d345..d1c407d 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,8 @@ "psr/log": "^1.1" }, "require-dev": { - "illuminate/support": "5.1 - 5.8", - "monolog/monolog": "^1.25", + "illuminate/support": "^5.8|^6.0|^7.0", + "monolog/monolog": "^1.25|^2.0", "phpunit/phpunit": "^7.5", "symfony/var-dumper": "^4.3" }, diff --git a/src/LaravelServiceProvider.php b/src/LaravelServiceProvider.php index e9943b0..8f6f0df 100644 --- a/src/LaravelServiceProvider.php +++ b/src/LaravelServiceProvider.php @@ -17,15 +17,14 @@ use GuzzleHttp\Client as GuzzleClient; use Illuminate\Support\ServiceProvider; use Illuminate\Contracts\Container\Container; +use Illuminate\Contracts\Support\DeferrableProvider; use Appwilio\RussianPostSDK\Tracking\PacketAccessClient; use Appwilio\RussianPostSDK\Tracking\SingleAccessClient; use Appwilio\RussianPostSDK\Dispatching\DispatchingClient; -class LaravelServiceProvider extends ServiceProvider +class LaravelServiceProvider extends ServiceProvider implements DeferrableProvider { - protected $defer = true; - - public function register() + public function register(): void { $this->app->singleton(SingleAccessClient::class, function (Container $app) { $config = $app['config']['services.russianpost.tracking'];