Skip to content

Commit

Permalink
laravel 5.5 up, vendor:publish --all
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Mar 14, 2018
1 parent 29923d0 commit 454112b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Console/Commands/Artisan.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ protected function forceCommand($command)
$command .= ' --force';
}

if (Str::startsWith($command, 'vendor:publish') === true && strpos($command, '--all') === false) {
if ((
version_compare(app()->version(), 5.5, '>=') &&
Str::startsWith($command, 'vendor:publish') === true
) && strpos($command, '--all') === false) {
$command .= ' --all';
}

Expand Down
15 changes: 15 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,18 @@ public function __call($method, $arguments)
}
}
}

if (function_exists('app') === false) {
class Application
{
public function version()
{
return '5.5.0';
}
}

function app()
{
return new Application;
}
}

0 comments on commit 454112b

Please sign in to comment.