File tree 3 files changed +20
-6
lines changed 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 23
23
"no-long-code": [
24
24
1,
25
25
{
26
- "length": 1000 ,
26
+ "length": 10000 ,
27
27
"exclude": [
28
28
"dot"
29
29
]
30
30
}
31
31
]
32
32
}
33
- }
33
+ }
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ $ composer require guanguans/laravel-soar --dev -v
47
47
48
48
#### laravel
49
49
50
- ``` bash
50
+ ``` shell
51
51
$ php artisan vendor:publish --provider=" Guanguans\\ LaravelSoar\\ SoarServiceProvider"
52
52
```
53
53
@@ -59,6 +59,13 @@ Add the following snippet to the `bootstrap/app.php` file under the `Register Se
59
59
$app->register(\Guanguans\LaravelSoar\SoarServiceProvider::class);
60
60
```
61
61
62
+ ### :warning : When running in a unix OS non-cli environment, may throw ` Fatal error: ...Exit Code: 2(Misuse of shell builtins)... `
63
+
64
+ ``` shell
65
+ # Fatal error: Uncaught Guanguans\SoarPHP\Exceptions\ProcessFailedException: The command "'/Users/yaozm/Documents/develop/soar-php/bin/soar.darwin-amd64' '-report-type=json' '-query=select * from users;'" failed. Exit Code: 2(Misuse of shell builtins) Working directory: /Users/yaozm/Documents/develop/soar-php Output: ================ Error Output: ================ panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1938665] goroutine 1 [running]: github.com/pingcap/tidb/util/memory.MemTotalNormal() pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20210601085537-5d7c852770eb/util/memory/meminfo.go:41 +0x65 github.com/pingcap/tidb/util/memory.init.0() pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20210601085537-5d7c852770eb/util/memory/meminfo.go:134 +0x175 in /Users/yaozm/Documents/develop/soar-php/src/Concerns/WithRunable.php:36 Stack trace: #0 /Users/yaozm/Documents/develop/soar-php/test.php(163): Guanguans\SoarPHP\Soar->run() #1 /User in /Users/yaozm/Documents/develop/soar-php/src/Concerns/WithRunable.php on line 36
66
+ SOAR_SUDO_PASSWORD=' your sudo password' # Set a sudo password to run the soar command with sudo to avoid the above errors.
67
+ ```
68
+
62
69
## Usage
63
70
64
71
### Sample code
@@ -614,7 +621,7 @@ namespace Illuminate\Database\Eloquent {
614
621
615
622
## Testing
616
623
617
- ``` bash
624
+ ``` shell
618
625
$ composer test
619
626
```
620
627
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ $ composer require guanguans/laravel-soar --dev -v
48
48
49
49
#### laravel
50
50
51
- ``` bash
51
+ ``` shell
52
52
$ php artisan vendor:publish --provider=" Guanguans\\ LaravelSoar\\ SoarServiceProvider"
53
53
```
54
54
@@ -60,6 +60,13 @@ $ php artisan vendor:publish --provider="Guanguans\\LaravelSoar\\SoarServiceProv
60
60
$app->register(\Guanguans\LaravelSoar\SoarServiceProvider::class);
61
61
```
62
62
63
+ ### :warning : 在 unix 操作系统非 cli 环境中运行时,可能会抛出 ` Fatal error: ...Exit Code: 2(Misuse of shell builtins)... `
64
+
65
+ ``` shell
66
+ # Fatal error: Uncaught Guanguans\SoarPHP\Exceptions\ProcessFailedException: The command "'/Users/yaozm/Documents/develop/soar-php/bin/soar.darwin-amd64' '-report-type=json' '-query=select * from users;'" failed. Exit Code: 2(Misuse of shell builtins) Working directory: /Users/yaozm/Documents/develop/soar-php Output: ================ Error Output: ================ panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1938665] goroutine 1 [running]: github.com/pingcap/tidb/util/memory.MemTotalNormal() pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20210601085537-5d7c852770eb/util/memory/meminfo.go:41 +0x65 github.com/pingcap/tidb/util/memory.init.0() pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20210601085537-5d7c852770eb/util/memory/meminfo.go:134 +0x175 in /Users/yaozm/Documents/develop/soar-php/src/Concerns/WithRunable.php:36 Stack trace: #0 /Users/yaozm/Documents/develop/soar-php/test.php(163): Guanguans\SoarPHP\Soar->run() #1 /User in /Users/yaozm/Documents/develop/soar-php/src/Concerns/WithRunable.php on line 36
67
+ SOAR_SUDO_PASSWORD=' your sudo password' # 设置 sudo 密码,以 sudo 运行 soar 命令,避免出现上述错误。
68
+ ```
69
+
63
70
## 使用
64
71
65
72
### 示例代码
@@ -615,7 +622,7 @@ namespace Illuminate\Database\Eloquent {
615
622
616
623
## 测试
617
624
618
- ``` bash
625
+ ``` shell
619
626
$ composer test
620
627
```
621
628
You can’t perform that action at this time.
0 commit comments