Skip to content

Commit b0d1ae2

Browse files
committed
chore: composer cleanup
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
1 parent 15b025d commit b0d1ae2

File tree

11 files changed

+895
-1598
lines changed

11 files changed

+895
-1598
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ cypress/snapshots/diff
3838
# RelativeCI webpack bundle stats
3939
webpack-stats.json
4040
*.orig
41+
.php-cs-fixer.cache

composer.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"name": "nextcloud/viewer",
33
"config": {
4+
"allow-plugins": {
5+
"bamarni/composer-bin-plugin": true
6+
},
47
"optimize-autoloader": true,
5-
"classmap-authoritative": true,
8+
"sort-packages": true,
69
"platform": {
710
"php": "8.2"
811
},
@@ -12,22 +15,27 @@
1215
},
1316
"scripts": {
1417
"post-install-cmd": [
15-
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all install --ansi",
16-
"composer dump-autoload"
18+
"@composer bin all install --ansi"
1719
],
1820
"post-update-cmd": [
19-
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all update --ansi",
20-
"composer dump-autoload"
21+
"@composer bin all install --ansi"
2122
],
23+
"cs:fix": "php-cs-fixer fix",
2224
"cs:check": "php-cs-fixer fix --dry-run --diff",
2325
"cs:fix": "php-cs-fixer fix",
2426
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './tests/stubs/*' -print0 | xargs -0 -n1 php -l",
2527
"psalm": "psalm --threads=1",
2628
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
2729
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
28-
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
30+
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
31+
"rector": "rector && composer cs:fix"
32+
},
33+
"require": {
34+
"bamarni/composer-bin-plugin": "^1.8",
35+
"php": "^8.1"
2936
},
3037
"require-dev": {
31-
"bamarni/composer-bin-plugin": "^1.8"
38+
"nextcloud/coding-standard": "^1.2.0",
39+
"nextcloud/ocp": "dev-master"
3240
}
3341
}

0 commit comments

Comments
 (0)