Skip to content

Commit f0e6e5e

Browse files
committed
ci(deps): Add new dependencies to composer.json
- Added "mrpunyapal/rector-pest" version "^0.1.5" for improved testing capabilities. - Included "spatie/invade" version "^2.1" for enhanced functionality. - Updated the "monorepo-builder:release" command to include "@git-chglog" for better release management. Signed-off-by: guanguans <[email protected]>
1 parent a1ab5dc commit f0e6e5e

File tree

16 files changed

+188
-42
lines changed

16 files changed

+188
-42
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Bug Report
22
# https://github.com/spatie/package-skeleton-php/tree/main/.github/ISSUE_TEMPLATE
33
description: Report an Issue or Bug with the Package
44
title: "[Bug]: "
5-
labels: [ "bug" ]
5+
labels: ["bug"]
66
body:
77
- type: markdown
88
attributes:

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🚀 New feature proposal
22
# https://github.com/antfu/.github/tree/main/.github/ISSUE_TEMPLATE
33
description: Propose a new feature
4-
labels: [ enhancement ]
4+
labels: [enhancement]
55
body:
66
- type: markdown
77
attributes:

.github/ISSUE_TEMPLATE/typo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 👀 Typo / Grammar fix
22
# https://github.com/antfu/.github/tree/main/.github/ISSUE_TEMPLATE
33
description: You can just go ahead and send a PR! Thank you!
4-
labels: [ ]
4+
labels: []
55
body:
66
- type: markdown
77
attributes:
@@ -13,4 +13,4 @@ body:
1313
- type: textarea
1414
id: context
1515
attributes:
16-
label: Additional context
16+
label: Additional context

.github/workflows/issues-translate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: issues-translate
33
on:
44
workflow_dispatch:
55
issue_comment:
6-
types: [ created ]
6+
types: [created]
77
issues:
8-
types: [ opened ]
8+
types: [opened]
99

1010
jobs:
1111
build:

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
os: [ windows-latest, macos-latest, ubuntu-latest ]
15-
php: [ 8.1, 8.5 ]
16-
dependency-version: [ prefer-stable ]
14+
os: [windows-latest, macos-latest, ubuntu-latest]
15+
php: [8.1, 8.5]
16+
dependency-version: [prefer-stable]
1717

1818
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
1919

.php-cs-fixer-custom.php

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<?php
2+
3+
/** @noinspection PhpPossiblePolymorphicInvocationInspection */
4+
/** @noinspection PhpUnusedAliasInspection */
5+
6+
declare(strict_types=1);
7+
8+
/**
9+
* Copyright (c) 2019-2025 guanguans<[email protected]>
10+
*
11+
* For the full copyright and license information, please view
12+
* the LICENSE file that was distributed with this source code.
13+
*
14+
* @see https://github.com/guanguans/soar-php
15+
*/
16+
17+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\AbstractCommandLineToolFixer;
18+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\AutocorrectFixer;
19+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\BladeFormatterFixer;
20+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\DockerfmtFixer;
21+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\DotenvLinterFixer;
22+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\LintMdFixer;
23+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\MarkdownlintCli2Fixer;
24+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\MarkdownlintFixer;
25+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\PintFixer;
26+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\ShfmtFixer;
27+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\SqlfluffFixer;
28+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\SqruffFixer;
29+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\TextlintFixer;
30+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\TombiFixer;
31+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\XmllintFixer;
32+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\YamlfmtFixer;
33+
use Guanguans\PhpCsFixerCustomFixers\Fixer\CommandLineTool\ZhlintFixer;
34+
use Guanguans\PhpCsFixerCustomFixers\Fixer\InlineHtml\JsonFixer;
35+
use Guanguans\PhpCsFixerCustomFixers\Fixer\InlineHtml\SqlOfDoctrineSqlFormatterFixer;
36+
use Guanguans\PhpCsFixerCustomFixers\Fixer\InlineHtml\SqlOfPhpmyadminSqlParserFixer;
37+
use Guanguans\PhpCsFixerCustomFixers\Fixers;
38+
use PhpCsFixer\Config;
39+
use PhpCsFixer\Finder;
40+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
41+
42+
// putenv('PHP_CS_FIXER_ENFORCE_CACHE=1');
43+
// putenv('PHP_CS_FIXER_IGNORE_ENV=1');
44+
putenv('PHP_CS_FIXER_FUTURE_MODE=1');
45+
putenv('PHP_CS_FIXER_NON_MONOLITHIC=1');
46+
putenv('PHP_CS_FIXER_PARALLEL=1');
47+
48+
return (new Config)
49+
->registerCustomFixers($fixers = Fixers::make())
50+
->setRules([
51+
'encoding' => true,
52+
'no_trailing_whitespace' => true,
53+
'no_whitespace_in_blank_line' => true,
54+
'non_printable_character' => true,
55+
'single_blank_line_at_eof' => true,
56+
57+
AutocorrectFixer::name() => true,
58+
LintMdFixer::name() => true,
59+
// MarkdownlintCli2Fixer::name() => true,
60+
MarkdownlintFixer::name() => true,
61+
// TextlintFixer::name() => true,
62+
ZhlintFixer::name() => true,
63+
64+
// PintFixer::name() => true,
65+
// BladeFormatterFixer::name() => [ // Custom BladeFormatterFixer configuration
66+
// AbstractCommandLineToolFixer::COMMAND => ['path/to/node', 'path/to/blade-formatter'],
67+
// AbstractCommandLineToolFixer::OPTIONS => [
68+
// '--config' => 'path/to/.bladeformatterrc',
69+
// '--extra-liners' => true,
70+
// '--indent-size' => 2,
71+
// // ...
72+
// ],
73+
// ],
74+
BladeFormatterFixer::name() => true, // Default BladeFormatterFixer configuration
75+
76+
SqlOfDoctrineSqlFormatterFixer::name() => true,
77+
// SqlOfPhpmyadminSqlParserFixer::name() => true,
78+
// SqruffFixer::name() => true,
79+
// SqlfluffFixer::name() => true,
80+
// SqlfluffFixer::name() => [
81+
// AbstractCommandLineToolFixer::OPTIONS => [
82+
// '--dialect' => 'mysql',
83+
// ],
84+
// AbstractCommandLineToolFixer::EXTENSIONS => ['sql'],
85+
// ],
86+
87+
DockerfmtFixer::name() => true,
88+
DotenvLinterFixer::name() => true,
89+
JsonFixer::name() => true,
90+
ShfmtFixer::name() => true,
91+
TombiFixer::name() => true,
92+
XmllintFixer::name() => true,
93+
YamlfmtFixer::name() => true,
94+
])
95+
->setFinder(
96+
Finder::create()
97+
->in(__DIR__)
98+
->exclude([
99+
'__snapshots__/',
100+
'Fixtures/',
101+
'vendor-bin/',
102+
])
103+
->notPath([
104+
'.chglog/CHANGELOG.tpl.md',
105+
'CHANGELOG.md',
106+
// 'composer.json',
107+
'README-zh_CN.md',
108+
'README.md',
109+
])
110+
->name($fixers->extensionPatterns())
111+
->notName([
112+
'/\-overview\.md$/',
113+
'/\.lock$/',
114+
'/\-lock\.json$/',
115+
// '/\.php$/',
116+
'/(?<!\.blade)\.php$/',
117+
'/zhlint\-.*\.zh_CN\.md$/',
118+
])
119+
->ignoreDotFiles(false)
120+
->ignoreUnreadableDirs(false)
121+
->ignoreVCS(true)
122+
->ignoreVCSIgnored(true)
123+
)
124+
->setCacheFile(\sprintf('%s/.build/php-cs-fixer/%s.cache', __DIR__, pathinfo(__FILE__, \PATHINFO_FILENAME)))
125+
// ->setParallelConfig(ParallelConfigFactory::sequential())
126+
->setParallelConfig(ParallelConfigFactory::detect())
127+
->setRiskyAllowed(true)
128+
->setUnsupportedPhpVersionAllowed(true)
129+
->setUsingCache(true);

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ static function (array $carry, FixerInterface $fixer): array {
8585
'PhpCsFixerCustomFixers/isset_to_array_key_exists',
8686
'PhpCsFixerCustomFixers/no_commented_out_code',
8787
// 'PhpCsFixerCustomFixers/no_leading_slash_in_global_namespace',
88+
'PhpCsFixerCustomFixers/no_nullable_boolean_type',
8889
'PhpCsFixerCustomFixers/phpdoc_only_allowed_annotations',
8990
'PhpCsFixerCustomFixers/typed_class_constant', // @since 8.3
9091
],

.yamlfmt.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
formatter:
2+
type: basic
3+
eof_newline: true
4+
retain_line_breaks: true
5+
retain_line_breaks_single: true
6+
scan_folded_as_literal: true
7+
trim_trailing_whitespace: true

composer-bump

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ require __DIR__.'/vendor/autoload.php';
3131

3232
/** @noinspection PhpUnhandledExceptionInspection */
3333
/** @noinspection DuplicatedCode */
34+
/** @see https://github.com/symfony/ai/blob/main/bump */
3435
$statusCode = (new SingleCommandApplication)
3536
->setName('Composer Bump')
3637
->addOption('composer-json-path', null, InputOption::VALUE_OPTIONAL)

composer.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"composer/composer": "^2.9",
5151
"ergebnis/composer-normalize": "^2.48",
5252
"ergebnis/license": "^2.7",
53-
"ergebnis/php-cs-fixer-config": "^6.57",
54-
"ergebnis/rector-rules": "^1.8",
53+
"ergebnis/php-cs-fixer-config": "^6.58",
54+
"ergebnis/rector-rules": "^1.9",
5555
"fakerphp/faker": "^1.24",
5656
"guanguans/php-cs-fixer-custom-fixers": "^1.0",
5757
"illuminate/support": "^10.49 || ^11.0 || ^12.0",
@@ -70,13 +70,14 @@
7070
"phpstan/phpstan-webmozart-assert": "^2.0",
7171
"povils/phpmnd": "^3.6",
7272
"rector/jack": "^0.4",
73-
"rector/rector": "^2.2",
73+
"rector/rector": "^2.3",
7474
"rector/swiss-knife": "^2.3",
7575
"rector/type-perfect": "^2.1",
7676
"shipmonk/composer-dependency-analyser": "^1.8",
7777
"shipmonk/dead-code-detector": "^0.14",
7878
"shipmonk/name-collision-detector": "^2.1",
7979
"shipmonk/phpstan-baseline-per-identifier": "^2.3",
80+
"spatie/invade": "^2.1",
8081
"spatie/pest-plugin-snapshots": "^2.2",
8182
"spaze/phpstan-disallowed-calls": "^4.7",
8283
"staabm/phpstan-todo-by": "^0.3",
@@ -181,6 +182,7 @@
181182
"@jack:open-versions-dry-run",
182183
"@jack:raise-to-installed-dry-run",
183184
"@jsonlint",
185+
"@php-cs-fixer:custom-fix-dry-run",
184186
"@phpmnd",
185187
"@phpstan:analyse",
186188
"@rector:process-dry-run",
@@ -277,7 +279,10 @@
277279
"@putenv:php",
278280
"$PHP82 vendor/bin/monorepo-builder --ansi -vv"
279281
],
280-
"monorepo-builder:release": "@monorepo-builder release",
282+
"monorepo-builder:release": [
283+
"@git-chglog",
284+
"@monorepo-builder release"
285+
],
281286
"monorepo-builder:release-1.0.0-BETA1": "@monorepo-builder:release 1.0.0-BETA1",
282287
"monorepo-builder:release-1.0.0-BETA1-dry-run": "@monorepo-builder:release-1.0.0-BETA1 --dry-run",
283288
"monorepo-builder:release-major": "@monorepo-builder:release major",
@@ -302,7 +307,7 @@
302307
"pest:highest": [
303308
"@putenv:php",
304309
"@putenv:xdebug-on",
305-
"$PHP85 vendor/bin/pest --colors=always --min=80 --coverage",
310+
"$PHP85 vendor/bin/pest --colors=always --min=80 --coverage --profile",
306311
"@putenv:xdebug-off"
307312
],
308313
"pest:migrate-configuration": "@pest --migrate-configuration",
@@ -313,10 +318,13 @@
313318
"pest:update-snapshots": "@pest --update-snapshots",
314319
"php-cs-fixer": "@php vendor/bin/php-cs-fixer --ansi -vv",
315320
"php-cs-fixer:custom": "@php-cs-fixer --config=.php-cs-fixer-custom.php",
316-
"php-cs-fixer:custom-check": "@php-cs-fixer:custom check --show-progress=dots --diff",
317321
"php-cs-fixer:custom-fix": "@php-cs-fixer:custom fix --show-progress=dots --diff",
318-
"php-cs-fixer:custom-fix-dry-run": "@php-cs-fixer:custom-fix --dry-run",
322+
"php-cs-fixer:custom-fix-dry-run": [
323+
"@php-cs-fixer:custom-list-files",
324+
"@php-cs-fixer:custom-fix --dry-run"
325+
],
319326
"php-cs-fixer:custom-list-files": "@php-cs-fixer:custom list-files",
327+
"php-cs-fixer:custom-ln-config": "ln -f vendor/guanguans/php-cs-fixer-custom-fixers/.php-cs-fixer-custom.php .php-cs-fixer-custom.php",
320328
"php-cs-fixer:fix": "@php-cs-fixer fix --show-progress=dots --diff",
321329
"php-cs-fixer:fix-dry-run": "@php-cs-fixer:fix --dry-run",
322330
"php-cs-fixer:list-files": "@php-cs-fixer list-files",

0 commit comments

Comments
 (0)