Skip to content

Commit 89bf372

Browse files
committed
build(dependencies): remove unused dev dependencies and add separate composer.json for psl
- Remove azjezz/psl, caseyamcl/guzzle_retry_middleware, infection packages, kevinrob/guzzle-cache-middleware, nette/utils, and update pestphp/pest-plugin-faker version constraint in main composer.json - Add new composer.json in vendor-bin/psl directory to manage azjezz/psl dev dependency separately - Clean up allow-plugins section by removing infection/extension-installer plugin permission - Improve dependency management by isolating psl package requirements Signed-off-by: guanguans <[email protected]>
1 parent 1dace96 commit 89bf372

File tree

3 files changed

+31
-18
lines changed

3 files changed

+31
-18
lines changed

composer.json

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@
8484
"symfony/options-resolver": "^5.4 || ^6.0 || ^7.0"
8585
},
8686
"require-dev": {
87-
"azjezz/psl": "^0.0 || ^1.0 || ^2.0",
8887
"bamarni/composer-bin-plugin": "^1.8",
8988
"brainmaestro/composer-git-hooks": "^3.0",
90-
"caseyamcl/guzzle_retry_middleware": "^2.13",
9189
"composer/composer": "^2.8",
9290
"ergebnis/composer-normalize": "^2.48",
9391
"ergebnis/license": "^2.7",
@@ -96,13 +94,9 @@
9694
"guanguans/monorepo-builder-worker": "^2.1",
9795
"illuminate/collections": "^9.52 || ^10.0 || ^11.0 || ^12.0",
9896
"illuminate/support": "^9.52 || ^10.0 || ^11.0 || ^12.0",
99-
"infection/extension-installer": "^0.1",
100-
"infection/infection": "^0.26",
101-
"kevinrob/guzzle-cache-middleware": "^5.1 || ^6.0 || ^7.0",
10297
"mockery/mockery": "^1.6",
103-
"nette/utils": "^4.0",
10498
"pestphp/pest": "^1.23 || ^2.0 || ^3.0 || ^4.0",
105-
"pestphp/pest-plugin-faker": "^1.0 || ^2.0 || ^3.0 || ^4.0",
99+
"pestphp/pest-plugin-faker": "^1.0",
106100
"php-mock/php-mock-phpunit": "^2.13",
107101
"phpbench/phpbench": "^1.2",
108102
"phpstan/extension-installer": "^1.4",
@@ -148,7 +142,6 @@
148142
"allow-plugins": {
149143
"bamarni/composer-bin-plugin": true,
150144
"ergebnis/composer-normalize": true,
151-
"infection/extension-installer": true,
152145
"pestphp/pest-plugin": true,
153146
"phpstan/extension-installer": true
154147
},
@@ -173,10 +166,10 @@
173166
},
174167
"hooks": {
175168
"post-merge": [
176-
"composer checks"
169+
"composer checks-required"
177170
],
178171
"pre-commit": [
179-
"composer checks"
172+
"composer checks-required"
180173
]
181174
}
182175
},
@@ -199,13 +192,19 @@
199192
"benchmark": "@php ./vendor/bin/phpbench run --report=aggregate --ansi -v",
200193
"cghooks": "@php ./vendor/bin/cghooks --ansi -v",
201194
"checks": [
195+
"@checks-required",
196+
"@checks-optional"
197+
],
198+
"checks-optional": [
199+
"@md-lint",
200+
"@zh-lint"
201+
],
202+
"checks-required": [
202203
"@composer-normalize",
203204
"@composer-validate",
204205
"@platform-lint",
205206
"@generate-ide-json",
206207
"@yaml-lint",
207-
"@md-lint",
208-
"@zh-lint",
209208
"@style-lint",
210209
"@composer-dependency-analyser",
211210
"@test",
@@ -216,7 +215,8 @@
216215
"composer-bin-all-update": "@composer bin all update --ansi -v",
217216
"composer-check-platform-reqs": "@composer check-platform-reqs --lock --ansi -v",
218217
"composer-dependency-analyser": "@php ./vendor/bin/composer-dependency-analyser --verbose",
219-
"composer-normalize": "@composer normalize --dry-run --diff --ansi -v",
218+
"composer-normalize": "@composer normalize --diff --ansi -v",
219+
"composer-normalize-dry-run": "@composer-normalize --dry-run",
220220
"composer-require-checker": "@php ./vendor/bin/composer-require-checker check --config-file=composer-require-checker.json composer.json --ansi -v",
221221
"composer-require-checker-json": "@php ./vendor/bin/composer-require-checker check --config-file=composer-require-checker.json composer.json --ansi -v --output=json | jq",
222222
"composer-unused": "@php ./vendor/bin/composer-unused --ansi -v",
@@ -234,8 +234,12 @@
234234
"mark-finish": "printf '\\n!\\n!\\t\\033[0;32m%s\\033[0m\\n!\\n\\n' \"Finished\"",
235235
"mark-separate": "printf '\\n!\\n!\\t\\033[0;33m%s\\033[0m\\n!\\n\\n' \"----------------\"",
236236
"mark-start": "printf '\\n!\\n!\\t\\033[0;36m%s\\033[0m\\n!\\n\\n' \"Started\"",
237-
"md-fix": "@md-lint --fix",
238-
"md-lint": "lint-md --config .lintmdrc ./*.md ./.github/ ./docs/ ./src/*/*.md",
237+
"md-fix": "@md-lint-original --fix",
238+
"md-lint": [
239+
"if ! command -v lint-md >/dev/null 2>&1; then echo 'lint-md not found, installing...'; npm install -g @lint-md/cli; fi",
240+
"@md-lint-original"
241+
],
242+
"md-lint-original": "lint-md --config .lintmdrc ./*.md ./.github/ ./docs/ ./src/*/*.md",
239243
"normalized": "@composer normalize --diff --ansi -v",
240244
"normalized-dry-run": "@normalized --dry-run",
241245
"peck": "/opt/homebrew/opt/[email protected]/bin/php ./vendor/bin/peck check --path=src/ --config=peck.json --ansi -v",
@@ -310,8 +314,12 @@
310314
"test-update-snapshots": "@pest-update-snapshots",
311315
"trufflehog": "trufflehog git https://github.com/guanguans/notify --only-verified",
312316
"yaml-lint": "@php ./vendor/bin/yaml-lint .github --ansi -v",
313-
"zh-fix": "@zh-lint --fix",
314-
"zh-lint": "zhlint {./,docs/,docs/**/}*-zh_CN.md"
317+
"zh-fix": "@zh-lint-original --fix",
318+
"zh-lint": [
319+
"if ! command -v zhlint >/dev/null 2>&1; then echo 'zhlint not found, installing...'; npm install -g zhlint; fi",
320+
"@zh-lint-original"
321+
],
322+
"zh-lint-original": "zhlint {./,docs/,docs/**/}*-zh_CN.md"
315323
},
316324
"scripts-aliases": {
317325
"lint": [

src/ZohoCliq/Authenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function (int $retries, RequestInterface $request, ?ResponseInterface $response
142142
}
143143

144144
if (401 === $response?->getStatusCode()) {
145-
// $request = $request->withHeader('Authorization', "Bearer {$this->refreshToken()}");
145+
// $request = &$request->withHeader('Authorization', "Bearer {$this->refreshToken()}");
146146
$this->cache->delete($this->cacheKey);
147147

148148
return true;

vendor-bin/psl/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require-dev": {
3+
"azjezz/psl": "^1.9"
4+
}
5+
}

0 commit comments

Comments
 (0)