Skip to content

Commit 5a2d8aa

Browse files
committed
ci(config): Update config files
1 parent 81bbacb commit 5a2d8aa

26 files changed

+153
-117
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-zh_CN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ return [
465465
Telescope 的 `EventWatcher``LogWatcher` 可观察到 Soar 评分的输出。
466466

467467
1. 安装 [laravel/telescope](https://github.com/laravel/telescope)
468-
2. 配置 `telescope.watchers`:
468+
2. 配置 `telescope.watchers`
469469

470470
```php
471471
<?php
@@ -546,6 +546,10 @@ php artisan soar:score --ansi < tests/Fixtures/queries.sql
546546
```shell
547547
composer checks:required
548548
composer test
549+
composer testbench soar:run
550+
composer testbench soar:score
551+
composer testbench:example-serve
552+
composer testbench:serve
549553
```
550554

551555
## 变更日志

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ php artisan soar:score --ansi < tests/Fixtures/queries.sql
546546
```shell
547547
composer checks:required
548548
composer test
549+
composer testbench soar:run
550+
composer testbench soar:score
551+
composer testbench:example-serve
552+
composer testbench:serve
549553
```
550554

551555
## Changelog

baselines/loader.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# total 9 errors
1+
# total 7 errors
22

33
includes:
44
- callable.nonCallable.neon
55
- method.notFound.neon
66
- offsetAccess.nonArray.neon
77
- offsetAccess.notFound.neon
8+
- staticMethod.dynamicCall.neon

baselines/method.notFound.neon

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
# total 4 errors
1+
# total 1 error
22

33
parameters:
44
ignoreErrors:
55
-
66
message: '#^Call to an undefined method DebugBar\\DataCollector\\DataCollectorInterface\:\:addMessage\(\)\.$#'
77
count: 1
88
path: ../src/Outputs/DebugBarOutput.php
9-
10-
-
11-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\|Illuminate\\Database\\Eloquent\\Relations\\Relation\|Illuminate\\Database\\Query\\Builder\:\:getBindings\(\)\.$#'
12-
count: 1
13-
path: ../src/Support/Utils.php
14-
15-
-
16-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\|Illuminate\\Database\\Eloquent\\Relations\\Relation\|Illuminate\\Database\\Query\\Builder\:\:getConnection\(\)\.$#'
17-
count: 1
18-
path: ../src/Support/Utils.php
19-
20-
-
21-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\|Illuminate\\Database\\Eloquent\\Relations\\Relation\|Illuminate\\Database\\Query\\Builder\:\:toSql\(\)\.$#'
22-
count: 1
23-
path: ../src/Support/Utils.php
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# total 1 error
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Dynamic call to static method Illuminate\\Database\\Query\\Builder\:\:toRawSql\(\)\.$#'
7+
count: 1
8+
path: ../src/Mixins/QueryBuilderMixin.php

composer-bump

Lines changed: 17 additions & 7 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_THROW_ON_ERROR | \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);
@@ -162,12 +162,18 @@ class ComposerBump
162162
continue;
163163
}
164164

165-
if ($version = InstalledVersions::getVersion($package)) {
166-
$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;
167170
}
168171

169-
if (isset($outdatedComposerPackages[$package])) {
170-
$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;
171177
}
172178
}
173179
}
@@ -238,6 +244,7 @@ class ComposerBump
238244
{
239245
return implode(' ', [
240246
escapeshellarg($phpBinary ?? (new PhpExecutableFinder)->find()),
247+
// '-d', escapeshellarg('error_reporting=E_ALL &~ E_DEPRECATED'),
241248
escapeshellarg((string) ($composerBinary ?? (new ExecutableFinder)->find('composer'))),
242249
]);
243250
}
@@ -261,7 +268,10 @@ class ComposerBump
261268
];
262269

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

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

composer-dependency-analyser.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717
return (new Configuration)
1818
->addPathsToScan(
1919
[
20-
__DIR__.'/config',
21-
__DIR__.'/src',
20+
__DIR__.'/config/',
2221
],
2322
false
2423
)
2524
->addPathsToExclude([
26-
__DIR__.'/tests',
27-
// __DIR__.'/src/Support/Rectors',
25+
__DIR__.'/tests/',
2826
])
2927
/** @see \ShipMonk\ComposerDependencyAnalyser\Analyser::CORE_EXTENSIONS */
3028
->ignoreErrorsOnExtensions(

0 commit comments

Comments
 (0)