From 76cbc0bc40cad6f1b8f2881d67ff7647d2fc0198 Mon Sep 17 00:00:00 2001 From: toplan Date: Fri, 15 Apr 2016 17:52:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81;=E4=BD=BF?= =?UTF-8?q?=E7=94=A8phpsms=20v1.3.1=E8=A7=A3=E5=86=B3queue=E4=B8=BAsync?= =?UTF-8?q?=E6=98=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- composer.json | 4 ++-- src/Toplan/LaravelSms/SendReminderSms.php | 14 ++++++-------- .../LaravelSms/SmsManagerServiceProvider.php | 4 ++-- src/config/laravel-sms.php | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 69159f9..ae109e1 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ phpsms为laravel-sms提供了全套的短信发送机制,而且phpsms也有自 在项目根目录下运行如下composer命令: ```php //安装2.3版本(推荐) - composer require 'toplan/laravel-sms:~2.3.0', + composer require 'toplan/laravel-sms:~2.3.1', //安装开发中版本 composer require 'toplan/laravel-sms:dev-master' diff --git a/composer.json b/composer.json index 5ac0446..4b3d921 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "toplan/laravel-sms", "description": "sms send package for laravel", "license": "MIT", - "version": "2.3.0", + "version": "2.3.1", "keywords": ["sms", "laravel sms", "laravel-sms"], "authors": [ { @@ -12,7 +12,7 @@ ], "require": { "php": ">=5.4.0", - "toplan/phpsms": "~1.3.0" + "toplan/phpsms": "~1.3.1" }, "autoload": { "classmap": [ diff --git a/src/Toplan/LaravelSms/SendReminderSms.php b/src/Toplan/LaravelSms/SendReminderSms.php index e556a23..25c04f7 100644 --- a/src/Toplan/LaravelSms/SendReminderSms.php +++ b/src/Toplan/LaravelSms/SendReminderSms.php @@ -1,25 +1,25 @@ sms = $sms; } @@ -31,8 +31,6 @@ public function __construct($sms) */ public function handle() { - if ($this->sms instanceof Sms) { - $this->sms->send(); - } + $this->sms->send(); } } diff --git a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php index 249ffb7..f7a6a2b 100644 --- a/src/Toplan/LaravelSms/SmsManagerServiceProvider.php +++ b/src/Toplan/LaravelSms/SmsManagerServiceProvider.php @@ -63,8 +63,8 @@ protected function initPhpSms() } // define how to use queue - $queueJob = config('laravel-sms.queueJob', 'App\Jobs\SendReminderSms'); - PS::queue(false, function ($sms, $data) use ($queueJob) { + $queueJob = config('laravel-sms.queueJob', 'Toplan\Sms\SendReminderSms'); + PS::queue(false, function ($sms) use ($queueJob) { if (!class_exists($queueJob)) { throw new LaravelSmsException("Class [$queueJob] does not exists."); } diff --git a/src/config/laravel-sms.php b/src/config/laravel-sms.php index 78b39a3..a338ae3 100644 --- a/src/config/laravel-sms.php +++ b/src/config/laravel-sms.php @@ -87,5 +87,5 @@ * queue job * ----------------------------------- */ - 'queueJob' => 'App\Jobs\SendReminderSms', + 'queueJob' => 'Toplan\Sms\SendReminderSms', ];