From 10c6b52b52cde4250e40bae83d7a17f0532adfc2 Mon Sep 17 00:00:00 2001 From: JackieDo Date: Mon, 10 Dec 2018 07:39:04 +0700 Subject: [PATCH] Fixed a bug for commands in Artisan CLI Laravel from 5.5 onwards - Add the method handle() as alias of te method fire() --- .travis.yml | 1 - phpunit.xml | 2 +- .../Console/Traits/CreateCommandInstanceTrait.php | 11 +++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 688c3b3..d18b4bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ php: - 5.4 - 5.5 - 5.6 - - hhvm before_script: - travis_retry composer self-update diff --git a/phpunit.xml b/phpunit.xml index 06ab212..d05f113 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,7 +8,7 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false"> + syntaxCheck="true"> ./tests/ diff --git a/src/Jackiedo/LogReader/Console/Traits/CreateCommandInstanceTrait.php b/src/Jackiedo/LogReader/Console/Traits/CreateCommandInstanceTrait.php index 010a0ae..e479bf4 100644 --- a/src/Jackiedo/LogReader/Console/Traits/CreateCommandInstanceTrait.php +++ b/src/Jackiedo/LogReader/Console/Traits/CreateCommandInstanceTrait.php @@ -22,4 +22,15 @@ public function __construct(LogReader $reader) parent::__construct(); } + + /** + * Execute the console command. + * This is alias of the method fire() + * + * @return mixed + */ + public function handle() + { + return $this->fire(); + } }