PMCORE-3845 Check and made the recommend changes in the Laravel upgrade guide
This commit is contained in:
committed by
Mauricio Veliz
parent
6d1d7d752e
commit
d0c5a23d67
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Contracts\Cache\Repository as Cache;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Queue\Console\WorkCommand as BaseWorkCommand;
|
||||
use Illuminate\Queue\Events\JobProcessing;
|
||||
@@ -9,7 +10,6 @@ use Illuminate\Queue\Worker;
|
||||
|
||||
class WorkCommand extends BaseWorkCommand
|
||||
{
|
||||
|
||||
use AddParametersTrait;
|
||||
|
||||
/**
|
||||
@@ -19,7 +19,7 @@ class WorkCommand extends BaseWorkCommand
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Worker $worker)
|
||||
public function __construct(Worker $worker, Cache $cache)
|
||||
{
|
||||
$this->signature .= '
|
||||
{--workspace=workflow : ProcessMaker Indicates the workspace to be processed.}
|
||||
@@ -28,7 +28,7 @@ class WorkCommand extends BaseWorkCommand
|
||||
|
||||
$this->description .= ' (ProcessMaker has extended this command)';
|
||||
|
||||
parent::__construct($worker);
|
||||
parent::__construct($worker, $cache);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,14 +62,14 @@ class WorkCommand extends BaseWorkCommand
|
||||
require_once $file;
|
||||
}
|
||||
//load the classes of the plugins when is required dynamically.
|
||||
$closure = function($className) {
|
||||
$closure = function ($className) {
|
||||
if (class_exists($className)) {
|
||||
return;
|
||||
}
|
||||
if (!defined('PATH_PLUGINS')) {
|
||||
return;
|
||||
}
|
||||
$searchFiles = function($path) use(&$searchFiles, $className) {
|
||||
$searchFiles = function ($path) use (&$searchFiles, $className) {
|
||||
$directories = File::directories($path);
|
||||
foreach ($directories as $directory) {
|
||||
$omittedDirectories = [
|
||||
|
||||
Reference in New Issue
Block a user