mirror of
https://github.com/nextcloud/server.git
synced 2026-10-15 02:57:15 +02:00
Dropping the bundled app takes the OCA.Viewer global and the LoadViewer event with it, and apps in the wild still use both: text and recommendations ask the global what it can open, photos opens and closes it, files_pdfviewer re-opens the current file with another handler, and photos, maps and collectives construct the event without checking that it exists, so their pages would fail on the missing class. The global goes back on the page, backed by the package rather than by the app. open() takes the paths and the loose file info apps passed before and turns them into nodes, the getters answer from what the last open() was given, and mimetypes answers by asking the handlers about a file of that type. registerHandler is deliberately not here: it was deprecated in the viewer app in August 2025 and this is where it stops. The event stays as an empty class nobody dispatches. Both live in apps/viewer, which is not an app: it has no appinfo, the server autoloads the event from it and the core viewer init script imports the bridge. The checkers that take every folder in apps/ for an app are told so: .noopenapi, the untranslated list, and a skip in the autoloader checker and in tests/enable_all.php for folders without an appinfo/info.xml. psalm lints it like the others. Every use of the global logs a warning naming the replacement and Nextcloud 39, where the folder and those exceptions go. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
97 lines
3.5 KiB
JSON
97 lines
3.5 KiB
JSON
{
|
|
"config": {
|
|
"vendor-dir": "lib/composer",
|
|
"optimize-autoloader": true,
|
|
"sort-packages": true,
|
|
"platform": {
|
|
"php": "8.3"
|
|
},
|
|
"allow-plugins": {
|
|
"bamarni/composer-bin-plugin": true
|
|
}
|
|
},
|
|
"autoload": {
|
|
"exclude-from-classmap": [
|
|
"**/bamarni/composer-bin-plugin/**"
|
|
],
|
|
"files": [
|
|
"lib/public/Log/functions.php"
|
|
],
|
|
"psr-4": {
|
|
"": "lib/private/legacy",
|
|
"OC\\": "lib/private",
|
|
"OC\\Core\\": "core/",
|
|
"OCP\\": "lib/public",
|
|
"OCA\\Viewer\\": "apps/viewer/lib",
|
|
"NCU\\": "lib/unstable"
|
|
}
|
|
},
|
|
"require": {
|
|
"php": "^8.3",
|
|
"ext-apcu": "*",
|
|
"ext-ctype": "*",
|
|
"ext-curl": "*",
|
|
"ext-dom": "*",
|
|
"ext-fileinfo": "*",
|
|
"ext-gd": "*",
|
|
"ext-libxml": "*",
|
|
"ext-mbstring": "*",
|
|
"ext-openssl": "*",
|
|
"ext-pdo": "*",
|
|
"ext-posix": "*",
|
|
"ext-session": "*",
|
|
"ext-simplexml": "*",
|
|
"ext-xml": "*",
|
|
"ext-xmlreader": "*",
|
|
"ext-xmlwriter": "*",
|
|
"ext-zip": "*",
|
|
"ext-zlib": "*"
|
|
},
|
|
"suggest": {
|
|
"ext-sodium": "Argon2 password hashing and Ed25519 signature verification for RFC 9421 HTTP message signatures."
|
|
},
|
|
"require-dev": {
|
|
"bamarni/composer-bin-plugin": "^1.4"
|
|
},
|
|
"scripts": {
|
|
"post-install-cmd": [
|
|
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all install",
|
|
"composer dump-autoload --no-dev"
|
|
],
|
|
"post-update-cmd": [
|
|
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all update --ansi",
|
|
"composer dump-autoload --no-dev"
|
|
],
|
|
"cs:fix": "php-cs-fixer fix",
|
|
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
|
"lint": "find . -type f -name '*.php' -not -path './3rdparty/*' -not -path '*/composer/*' -not -path '*/stubs/*' -not -path '*/vendor-bin/*' -not -path '*/vendor/*' -print0 | xargs -0 -n200 -P$(nproc) php -l",
|
|
"psalm": "psalm --no-cache --threads=$(nproc)",
|
|
"psalm:ocp": "psalm --no-cache --threads=$(nproc) -c psalm-ocp.xml",
|
|
"psalm:ncu": "psalm --no-cache --threads=$(nproc) -c psalm-ncu.xml",
|
|
"psalm:strict": "psalm --no-cache --threads=$(nproc) -c psalm-strict.xml",
|
|
"psalm:security": "psalm --no-cache --threads=$(nproc) --taint-analysis --use-baseline=build/psalm-baseline-security.xml",
|
|
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
|
|
"psalm:update-baseline": "psalm --no-cache --threads=$(nproc) --update-baseline",
|
|
"serve": [
|
|
"Composer\\Config::disableProcessTimeout",
|
|
"php -f occ config:system:set 'overwrite.cli.url' --type string --value \"http://${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080}\"",
|
|
"PHP_CLI_SERVER_WORKERS=${NEXTCLOUD_WORKERS:=4} php -S ${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080} -t ./"
|
|
],
|
|
"test": [
|
|
"Composer\\Config::disableProcessTimeout",
|
|
"phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --display-skipped --colors=always --configuration tests/phpunit-autotest.xml"
|
|
],
|
|
"test:db": "@composer run test -- --group DB --group SLOWDB --exclude-group S3 --exclude-group PRIMARY-swift --exclude-group PRIMARY-s3 --exclude-group PRIMARY-azure",
|
|
"test:files_external": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest-external.xml",
|
|
"rector": "rector --config=build/rector.php && composer cs:fix",
|
|
"rector:strict": "rector --config=build/rector-strict.php && composer cs:fix",
|
|
"openapi": "./build/openapi-checker.sh"
|
|
},
|
|
"extra": {
|
|
"bamarni-bin": {
|
|
"bin-links": true,
|
|
"forward-command": false
|
|
}
|
|
}
|
|
}
|