|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: conci |
|
5
|
|
|
* Date: 10/24/17 |
|
6
|
|
|
* Time: 10:33 AM |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace sonrac\WAMP\Commands; |
|
10
|
|
|
|
|
11
|
|
|
use Illuminate\Console\Command; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Class RunServer |
|
15
|
|
|
* Run WAMP server command |
|
16
|
|
|
* |
|
17
|
|
|
* @package sonrac\WAMP\Commands |
|
18
|
|
|
*/ |
|
19
|
|
|
class RunServer extends Command |
|
20
|
|
|
{ |
|
21
|
|
|
/** |
|
22
|
|
|
* WAMP router host |
|
23
|
|
|
* |
|
24
|
|
|
* @var string |
|
25
|
|
|
*/ |
|
26
|
|
|
protected $host; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* Wamp realm to used |
|
30
|
|
|
* |
|
31
|
|
|
* @var string |
|
32
|
|
|
*/ |
|
33
|
|
|
protected $realm; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* Providers list |
|
37
|
|
|
* |
|
38
|
|
|
* @var array |
|
39
|
|
|
*/ |
|
40
|
|
|
protected $providers = []; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* WAMP router port |
|
44
|
|
|
* |
|
45
|
|
|
* @var int |
|
46
|
|
|
*/ |
|
47
|
|
|
protected $port; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* Run in debug mode. If `in-background` option is disable, logging to storage_path('server-{pid}.log') |
|
51
|
|
|
* |
|
52
|
|
|
* @var bool |
|
53
|
|
|
*/ |
|
54
|
|
|
protected $debug = false; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Run command in background |
|
58
|
|
|
* |
|
59
|
|
|
* @var bool |
|
60
|
|
|
*/ |
|
61
|
|
|
protected $inBackground = false; |
|
62
|
|
|
|
|
63
|
|
|
protected $name = 'Run WAMP server'; |
|
64
|
|
|
protected $signature = 'wamp:run-server {--host=?} {--debud} {--in-background}'; |
|
65
|
|
|
protected $description = 'Run wamp server |
|
66
|
|
|
{}'; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* {@inheritdoc} |
|
70
|
|
|
*/ |
|
71
|
|
|
protected function getOptions() |
|
72
|
|
|
{ |
|
73
|
|
|
return [ |
|
74
|
|
|
['realm', null, InputOption::VALUE_OPTIONAL, 'Specify WAMP realm to be used'], |
|
|
|
|
|
|
75
|
|
|
['host', null, InputOption::VALUE_OPTIONAL, 'Specify the router host'], |
|
76
|
|
|
['port', null, InputOption::VALUE_OPTIONAL, 'Specify the router port'], |
|
77
|
|
|
['tls', null, InputOption::VALUE_NONE, 'Specify the router protocol as wss'], |
|
78
|
|
|
['path', null, InputOption::VALUE_OPTIONAL, 'Specify the router path component'], |
|
79
|
|
|
['providers', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Register provider classes'], |
|
80
|
|
|
['debug', null, InputOption::VALUE_NONE, 'Run in debug mode outputting all trasport messages.'], |
|
81
|
|
|
[ |
|
82
|
|
|
'in-background', |
|
83
|
|
|
null, |
|
84
|
|
|
InputOption::VALUE_NONE | InputOption::VALUE_OPTIONAL, |
|
85
|
|
|
'Run in background mode with save process pid' |
|
86
|
|
|
] |
|
87
|
|
|
]; |
|
88
|
|
|
} |
|
89
|
|
|
|
|
90
|
|
|
/** |
|
91
|
|
|
* Run server handle |
|
92
|
|
|
*/ |
|
93
|
|
|
protected function handle() |
|
94
|
|
|
{ |
|
95
|
|
|
|
|
96
|
|
|
} |
|
97
|
|
|
} |
|
98
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths