Skip to content

Commit 3bbe508

Browse files
committed
perf(autoloader): Force own autoloader
Signed-off-by: John Molakvoæ <[email protected]>
1 parent 541a388 commit 3bbe508

File tree

5 files changed

+314
-142
lines changed

5 files changed

+314
-142
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
->notPath('l10n')
1515
->notPath('src')
1616
->notPath('vendor')
17+
->notPath('composer')
1718
->in(__DIR__);
1819
return $config;

composer.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
11
{
22
"name": "nextcloud/photos",
33
"config": {
4-
"optimize-autoloader": true,
4+
"autoloader-suffix": "Photos",
55
"classmap-authoritative": true,
6+
"optimize-autoloader": true,
7+
"sort-packages": true,
8+
"allow-plugins": {
9+
"bamarni/composer-bin-plugin": true
10+
},
611
"platform": {
712
"php": "8.0"
813
}
914
},
15+
"autoload": {
16+
"psr-4": {
17+
"OCA\\Photos\\": "./lib/"
18+
}
19+
},
1020
"scripts": {
1121
"cs:fix": "php-cs-fixer fix",
1222
"cs:check": "php-cs-fixer fix --dry-run --diff",
13-
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
14-
"psalm": "psalm",
15-
"psalm:update-baseline": "psalm --update-baseline",
23+
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './composer/*' -print0 | xargs -0 -n1 php -l",
24+
"psalm": "psalm --threads=1",
25+
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
26+
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
27+
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
1628
"test:unit": "echo 'Only testing installation of the app'"
1729
},
1830
"require-dev": {
31+
"bamarni/composer-bin-plugin": "^1.8",
1932
"nextcloud/coding-standard": "1.0",
33+
"nextcloud/ocp": "dev-master",
2034
"phpunit/phpunit": "^9",
21-
"vimeo/psalm": "^4.22",
2235
"sabre/dav": "^4.2.1",
23-
"nextcloud/ocp": "dev-master"
36+
"vimeo/psalm": "^4.22"
2437
},
2538
"require": {
2639
"hexogen/kdtree": "^0.2.5"

0 commit comments

Comments
 (0)