Skip to content

Commit 80aa9cb

Browse files
committed
refactor(commands): remove extra blank line and use join_paths for log path
- Remove an unnecessary blank line after the dump() call in debug mode. - Build the soar.log path with join_paths instead of manual concatenation and import the function. Signed-off-by: guanguans <ityaozm@gmail.com>
1 parent 5a2d8aa commit 80aa9cb

39 files changed

+263
-44
lines changed

.php-cs-fixer.dist.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
'concat_space' => [
127127
'spacing' => 'none',
128128
],
129-
// 'empty_loop_condition' => [
130-
// 'style' => 'for',
131-
// ],
129+
'empty_loop_condition' => [
130+
'style' => 'for',
131+
],
132132
'explicit_string_variable' => false,
133133
'final_class' => false,
134134
// 'final_internal_class' => false,

.zhlintcaseignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# 忽略短语
44

55
Fatal error: ...Exit Code:
6+
SQL optimizer and rewriter for laravel.

README-zh_CN.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# laravel-soar
55

6-
> laravel 的 SQL 优化器和重写器。
6+
> SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。
77
88
[简体中文](README-zh_CN.md) | [ENGLISH](README.md)
99

@@ -53,7 +53,7 @@ php artisan vendor:publish --provider="Guanguans\\LaravelSoar\\SoarServiceProvid
5353
SOAR_SUDO_PASSWORD='your sudo password' # 设置 sudo 密码,以 sudo 运行 soar 命令,避免出现上述错误。
5454
```
5555

56-
#### [或者配置 sudoers](https://github.com/guanguans/soar-php#configure-sudo-password)
56+
#### [或者配置 sudoers](https://github.com/guanguans/soar-php#or-configure-sudoers)
5757

5858
## 使用
5959

@@ -550,6 +550,7 @@ composer testbench soar:run
550550
composer testbench soar:score
551551
composer testbench:example-serve
552552
composer testbench:serve
553+
composer testbench:test
553554
```
554555

555556
## 变更日志

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# laravel-soar
55

6-
> SQL optimizer and rewriter for laravel.
6+
> SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。
77
88
[简体中文](README-zh_CN.md) | [ENGLISH](README.md)
99

@@ -15,7 +15,7 @@
1515
[![Total Downloads](https://poser.pugx.org/guanguans/laravel-soar/downloads)](https://packagist.org/packages/guanguans/laravel-soar)
1616
[![License](https://poser.pugx.org/guanguans/laravel-soar/license)](https://packagist.org/packages/guanguans/laravel-soar)
1717

18-
## Feature
18+
## Features
1919

2020
* Supports heuristic rule suggestions, index rule suggestions, and `EXPLAIN` information interpretation
2121
* Support calling query builder `Mixin` methods for convenient dumping of rule suggestions
@@ -53,7 +53,7 @@ php artisan vendor:publish --provider="Guanguans\\LaravelSoar\\SoarServiceProvid
5353
SOAR_SUDO_PASSWORD='your sudo password' # Set a sudo password to run the soar command with sudo to avoid the above errors.
5454
```
5555

56-
#### [Or configure sudoers](https://github.com/guanguans/soar-php#configure-sudo-password)
56+
#### [Or configure sudoers](https://github.com/guanguans/soar-php#or-configure-sudoers)
5757

5858
## Usage
5959

@@ -550,6 +550,7 @@ composer testbench soar:run
550550
composer testbench soar:score
551551
composer testbench:example-serve
552552
composer testbench:serve
553+
composer testbench:test
553554
```
554555

555556
## Changelog

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"shipmonk/dead-code-detector": "^0.14",
9696
"shipmonk/name-collision-detector": "^2.1",
9797
"shipmonk/phpstan-baseline-per-identifier": "^2.2",
98+
"spatie/laravel-image-optimizer": "^1.8",
9899
"spatie/laravel-ray": "^1.43",
99100
"spaze/phpstan-disallowed-calls": "^4.7",
100101
"staabm/phpstan-todo-by": "^0.3",
@@ -239,7 +240,6 @@
239240
"@actionlint",
240241
"@gitleaks",
241242
"@lint-md",
242-
"@peck",
243243
"@zhlint"
244244
],
245245
"checks:required": [
@@ -461,6 +461,8 @@
461461
"@testbench:build",
462462
"@php -S localhost:8123 laravel/public/index.php"
463463
],
464+
"testbench:optimize:image": "@testbench optimize:image",
465+
"testbench:optimize:image-dry-run": "@testbench:optimize:image --dry-run",
464466
"testbench:prepare": "@testbench package:discover",
465467
"testbench:serve": [
466468
"@composer-config:disable-process-timeout",
@@ -472,6 +474,7 @@
472474
"@pest"
473475
],
474476
"todo-lint": "! git --no-pager grep --extended-regexp --ignore-case 'todo|fixme' -- '*.php' ':!*.blade.php' ':(exclude)resources/'",
477+
"touch:database-sqlite": "@php -r \"file_exists('vendor/orchestra/testbench-core/laravel/database/database.sqlite') || touch('vendor/orchestra/testbench-core/laravel/database/database.sqlite');\"",
475478
"trufflehog": "trufflehog git https://github.com/guanguans/laravel-soar --only-verified",
476479
"user:composer": [
477480
"@putenv:composer-memory-unlimited",

docs/clockwork.png

-166 KB
Loading

docs/commands.gif

0 Bytes
Loading

docs/console.png

-130 KB
Loading

docs/debug-bar.png

-130 KB
Loading

docs/dump.png

-99.2 KB
Loading

0 commit comments

Comments
 (0)