Skip to content

Commit 0fc5a35

Browse files
committed
build(deps): Update package versions and improve composer script
- Remove unnecessary dryRun property and entries in composer-updater. - Update ergebnis/composer-normalize to ^2.47. - Update ergebnis/rector-rules to ^1.4. - Update guanguans/monorepo-builder-worker to ^2.0. - Update various other dependencies to latest compatible versions for improved stability and features.
1 parent f9fe254 commit 0fc5a35

File tree

4 files changed

+62
-32
lines changed

4 files changed

+62
-32
lines changed

.chglog/config.yml

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
style: github
2-
# https://github.com/garden-io/garden
2+
# https://github.com/garden-io/garden/tree/main/.chglog
33
# https://github.com/git-chglog/git-chglog
4-
# https://github.com/quay/clair
5-
# https://github.com/muzilib/commit-template-idea-plugin/blob/main/src/main/resources/i18n/data_en_US.properties#L22
6-
# https://github.com/fobgochod/git-commit-message-format/blob/main/src/main/resources/messages/GitBundle.properties#L37
4+
# https://github.com/quay/clair/tree/main/.chglog
75
template: CHANGELOG.tpl.md
86
info:
97
title: CHANGELOG
108
repository_url: https://github.com/guanguans/soar-php
119
options:
10+
sort: semver
1211
commits:
12+
sort_by: Scope
1313
filters:
1414
Type:
1515
- build
@@ -24,24 +24,53 @@ options:
2424
- style
2525
- test
2626
commit_groups:
27+
group_by: Type
28+
sort_by: Custom
29+
title_order:
30+
# https://github.com/fobgochod/git-commit-message-format/blob/main/src/main/resources/messages/GitBundle.properties#L37
31+
- feat
32+
- fix
33+
- docs
34+
- style
35+
- refactor
36+
- perf
37+
- test
38+
- build
39+
- ci
40+
- chore
41+
- revert
2742
title_maps:
28-
build: Builds
29-
chore: Chores
30-
ci: Continuous Integrations
31-
docs: Documents
32-
feat: Features
33-
fix: Bug Fixes
34-
perf: Performance Improvements
35-
refactor: Code Refactorings
36-
revert: Reverts
37-
style: Styles
38-
test: Tests
43+
# https://github.com/antfu/changelogithub/blob/main/src/config.ts
44+
# https://github.com/unjs/changelogen/blob/main/src/config.ts
45+
# https://gitmoji.dev/
46+
build: 📦 Builds
47+
chore: 🏡 Chores
48+
ci: 🤖 Continuous Integrations
49+
docs: 📖 Documents
50+
feat: ✨ Features # 🚀 Enhancements
51+
fix: 🐞 Bug Fixes
52+
perf: 🏎 Performance Improvements
53+
refactor: 💅 Code Refactorings
54+
revert: ⏪️ Reverts
55+
style: 🎨 Styles
56+
test: ✅ Tests
57+
58+
examples: 🏀 Examples
59+
types: 🌊 Types
3960
header:
4061
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
4162
pattern_maps:
4263
- Type
4364
- Scope
4465
- Subject
66+
issues:
67+
prefix:
68+
- "#"
69+
refs:
70+
actions:
71+
- Closes
72+
- Fixes
73+
- PullRequest
4574
notes:
4675
keywords:
4776
- BREAKING CHANGE

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
## Installation
2929

3030
```shell
31-
composer require guanguans/soar-php --prefer-source --ansi -v
31+
composer require guanguans/soar-php --ansi -v
3232
```
3333

3434
## Usage

composer-updater

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ $status = (new SingleCommandApplication)
5858
private string $composerBinary;
5959
private array $exceptPackages;
6060
private array $exceptDependencyVersions;
61-
private bool $dryRun;
6261
private SymfonyStyle $symfonyStyle;
6362
private Differ $differ;
6463

@@ -71,7 +70,7 @@ $status = (new SingleCommandApplication)
7170
?string $composerBinary = null,
7271
array $exceptPackages = [],
7372
array $exceptDependencyVersions = [],
74-
bool $dryRun = false,
73+
private bool $dryRun = false,
7574
?SymfonyStyle $symfonyStyle = null,
7675
?Differ $differ = null
7776
) {
@@ -93,7 +92,6 @@ $status = (new SingleCommandApplication)
9392
'*@*',
9493
// '*|*',
9594
], $exceptDependencyVersions);
96-
$this->dryRun = $dryRun;
9795
$this->symfonyStyle = $symfonyStyle ?? new SymfonyStyle(new ArgvInput, new ConsoleOutput);
9896
$this->differ = $differ ?? new Differ;
9997
}
@@ -167,7 +165,7 @@ $status = (new SingleCommandApplication)
167165
private function getOutdatedDecodedComposerJson(): array
168166
{
169167
$outdatedComposerPackages = $this->getOutdatedComposerPackages();
170-
$decodedComposerJson = json_decode(file_get_contents($this->composerJsonPath), true);
168+
$decodedComposerJson = json_decode(file_get_contents($this->composerJsonPath), true, 512, \JSON_THROW_ON_ERROR);
171169
InstalledVersions::reload([]);
172170

173171
foreach ($decodedComposerJson as $name => &$value) {
@@ -176,10 +174,11 @@ $status = (new SingleCommandApplication)
176174
}
177175

178176
foreach ($value as $package => &$dependencyVersion) {
179-
if (
180-
Str::is($this->exceptPackages, $package)
181-
|| Str::is($this->exceptDependencyVersions, $dependencyVersion)
182-
) {
177+
if (Str::is($this->exceptPackages, $package)) {
178+
continue;
179+
}
180+
181+
if (Str::is($this->exceptDependencyVersions, $dependencyVersion)) {
183182
continue;
184183
}
185184

@@ -209,7 +208,9 @@ $status = (new SingleCommandApplication)
209208
->getOutput(),
210209
strpos($output, '{'.\PHP_EOL)
211210
),
212-
true
211+
true,
212+
512,
213+
\JSON_THROW_ON_ERROR
213214
)['installed'],
214215
function (array $carry, array $package): array {
215216
$lowestArrayVersion = $this->toArrayVersion($package['version']);

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848
"bamarni/composer-bin-plugin": "^1.8",
4949
"brainmaestro/composer-git-hooks": "^3.0",
5050
"composer/composer": "^2.8",
51-
"ergebnis/composer-normalize": "^2.45",
51+
"ergebnis/composer-normalize": "^2.47",
5252
"ergebnis/license": "^2.6",
5353
"ergebnis/php-cs-fixer-config": "dev-main",
54-
"ergebnis/rector-rules": "^1.3",
54+
"ergebnis/rector-rules": "^1.4",
5555
"guanguans/ai-commit": "dev-main",
56-
"guanguans/monorepo-builder-worker": "^1.4",
56+
"guanguans/monorepo-builder-worker": "^2.0",
5757
"illuminate/support": "^9.52 || ^10.0 || ^11.0 || ^12.0",
5858
"mockery/mockery": "^1.6",
5959
"nette/utils": "^4.0",
@@ -67,15 +67,15 @@
6767
"phpstan/phpstan-webmozart-assert": "^2.0",
6868
"povils/phpmnd": "^3.6",
6969
"rector/rector": "^2.0",
70-
"rector/swiss-knife": "^2.1",
71-
"rector/type-perfect": "^2.0",
70+
"rector/swiss-knife": "^2.2",
71+
"rector/type-perfect": "^2.1",
7272
"shipmonk/composer-dependency-analyser": "^1.8",
7373
"shipmonk/phpstan-baseline-per-identifier": "^2.1",
7474
"spatie/pest-plugin-snapshots": "^1.1 || ^2.0",
75-
"spaze/phpstan-disallowed-calls": "^4.4",
75+
"spaze/phpstan-disallowed-calls": "^4.5",
7676
"symfony/var-dumper": "^6.0 || ^7.0",
7777
"symplify/phpstan-extensions": "^12.0",
78-
"symplify/phpstan-rules": "^14.5",
78+
"symplify/phpstan-rules": "^14.6",
7979
"tomasvotruba/class-leak": "^2.0",
8080
"tomasvotruba/type-coverage": "^2.0",
8181
"yamadashy/phpstan-friendly-formatter": "^1.2"

0 commit comments

Comments
 (0)