Skip to content

Commit cc27437

Browse files
committed
ci(config): Update config files
1 parent 5305a63 commit cc27437

File tree

15 files changed

+45
-27
lines changed

15 files changed

+45
-27
lines changed

.zhlintcaseignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://github.com/zhlint-project/zhlint#advanced-usage
2+
# https://github.com/zhlint-project/zhlint#setup-ignored-cases
3+
# 忽略短语
4+
5+
Fatal error: ...Exit Code:

.zhlintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://github.com/zhlint-project/zhlint#advanced-usage
2+
# 忽略文件
3+

.zhlintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"preset": "default",
3+
"caseIgnores": [
4+
":warning:"
5+
],
36
"rules": {
4-
"fullwidthPunctuation": ",。;?!“”‘’",
5-
"spaceAfterHalfwidthPauseOrStop": false,
67
"spaceOutsideHalfwidthBracket": false
78
}
89
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,8 @@ guanguans ALL=(ALL) NOPASSWD: /Users/guanguans/Documents/develop/soar-php/bin/so
534534
```shell
535535
composer benchmark
536536
composer checks:required
537-
composer soar:usage-example-run
538-
composer soar:usage-example-serve
537+
composer soar:example-run
538+
composer soar:example-serve
539539
composer test
540540
```
541541

composer-bump

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ComposerBump
9595
public function __invoke(): void
9696
{
9797
$this
98-
->updateComposerPackages()
98+
// ->updateComposerPackages()
9999
->updateOutdatedComposerPackages()
100100
->updateComposerPackages()
101101
->normalizeComposerJson()
@@ -109,7 +109,7 @@ class ComposerBump
109109
{
110110
$outdatedComposerJsonContents = json_encode(
111111
$this->outdatedDecodedComposerJson(),
112-
\JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES
112+
\JSON_PRETTY_PRINT | \JSON_THROW_ON_ERROR | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE
113113
).\PHP_EOL;
114114

115115
file_put_contents($this->composerJsonPath, $outdatedComposerJsonContents);
@@ -140,7 +140,6 @@ class ComposerBump
140140
/**
141141
* @noinspection LongLine
142142
* @noinspection D
143-
* @noinspection PhpMultipleClassDeclarationsInspection
144143
*
145144
* @throws \JsonException
146145
*/
@@ -163,12 +162,18 @@ class ComposerBump
163162
continue;
164163
}
165164

166-
if ($version = InstalledVersions::getVersion($package)) {
167-
$dependencyVersion = $this->dependencyVersionFor($version);
165+
if (
166+
!Str::is($this->exceptVersions, $version = InstalledVersions::getVersion($package))
167+
&& !Str::is($this->exceptVersions, $originalVersion = $this->dependencyVersionFor($version))
168+
) {
169+
$dependencyVersion = $originalVersion;
168170
}
169171

170-
if (isset($outdatedComposerPackages[$package])) {
171-
$dependencyVersion = $outdatedComposerPackages[$package]['dependency_version'];
172+
if (
173+
isset($outdatedComposerPackages[$package])
174+
&& !Str::is($this->exceptVersions, $outdatedVersion = $outdatedComposerPackages[$package]['dependency_version'])
175+
) {
176+
$dependencyVersion = $outdatedVersion;
172177
}
173178
}
174179
}
@@ -239,6 +244,7 @@ class ComposerBump
239244
{
240245
return implode(' ', [
241246
escapeshellarg($phpBinary ?? (new PhpExecutableFinder)->find()),
247+
// '-d', escapeshellarg('error_reporting=E_ALL &~ E_DEPRECATED'),
242248
escapeshellarg((string) ($composerBinary ?? (new ExecutableFinder)->find('composer'))),
243249
]);
244250
}
@@ -262,7 +268,10 @@ class ComposerBump
262268
];
263269

264270
$cwd ??= \dirname($this->composerJsonPath);
265-
$env += ['COMPOSER_MEMORY_LIMIT' => -1];
271+
$env += [
272+
'COMPOSER_MEMORY_LIMIT' => -1,
273+
'XDEBUG_MODE' => 'off',
274+
];
266275

267276
$process = \is_string($command)
268277
? Process::fromShellCommandline(implode(' ', [$command, ...$options]), $cwd, $env, $input, $timeout)

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
"@php-cs-fixer:fix-dry-run-stop-on-violation",
215215
"@soar:check-binary",
216216
"@soar:dump-config",
217-
"@soar:usage-example-run",
217+
"@soar:example-run",
218218
"@pest:bail",
219219
"@rector:process-dry-run",
220220
"@phpstan:analyse"
@@ -387,7 +387,7 @@
387387
"rector:process-dry-run": "@rector:process --dry-run",
388388
"rector:process-only": "@rector:process-clear-cache --only=Guanguans\\SoarPHP\\Support\\Rectors\\AddHasOptionsDocCommentRector",
389389
"rector:process-only-dry-run": "@rector:process-only --dry-run",
390-
"rector:process-soar-options": "@rector:process-clear-cache --config=rector-soar-options.php",
390+
"rector:process-soar-options": "@rector:process-clear-cache --config=rector-options.php",
391391
"rector:process-soar-options-dry-run": "@rector:process-soar-options --dry-run",
392392
"rector:setup-ci": "@rector setup-ci",
393393
"rule-doc-generator": [
@@ -432,13 +432,13 @@
432432
],
433433
"soar:dump-php-config-prototype": "Guanguans\\SoarPHP\\Support\\ComposerScripts::dumpSoarPHPConfig",
434434
"soar:dump-yaml-config": "Guanguans\\SoarPHP\\Support\\ComposerScripts::dumpSoarYamlConfig",
435-
"soar:usage-example-run": [
435+
"soar:example-run": [
436436
"echo 'examples/example.php:\n'",
437-
"@php examples/usage-example.php"
437+
"@php examples/example.php"
438438
],
439-
"soar:usage-example-serve": [
439+
"soar:example-serve": [
440440
"@composer-config:disable-process-timeout",
441-
"@php -S localhost:8123 examples/usage-example.php"
441+
"@php -S localhost:8123 examples/example.php"
442442
],
443443
"testbench": "@php vendor/bin/testbench --ansi",
444444
"testbench:build": "@testbench workbench:build",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
return [
1919
// Config file path
20-
'-config' => __DIR__.'/soar-options.yaml',
20+
'-config' => __DIR__.'/options.yaml',
2121

2222
// TestDSN, 测试环境数据库配置, username:********@tcp(ip:port)/schema (default "tcp/information_schema?timeout=3s&charset=utf8")
2323
'-test-dsn' => [
@@ -75,7 +75,7 @@
7575
'-allow-online-as-test' => true,
7676

7777
// 指定 blacklist 配置文件的位置,文件中的 SQL 不会被评审。一行一条SQL,可以是指纹,也可以是正则
78-
'-blacklist' => __DIR__.'/soar.blacklist.example',
78+
'-blacklist' => __DIR__.'/blacklist.example',
7979

8080
// Explain, 是否开启Explain执行计划分析 (default true)
8181
'-explain' => true,

0 commit comments

Comments
 (0)