fix(files): conversion api simplification and conflict check #53220
static-code-analysis.yml
on: pull_request
static-code-analysis
4m 43s
static-code-analysis-security
11m 41s
static-code-analysis-ocp
1m 58s
static-code-analysis-ncu
1m 3s
Annotations
10 errors and 4 warnings
InvalidReturnType:
apps/files/lib/Capabilities.php#L27
apps/files/lib/Capabilities.php:27:13: InvalidReturnType: The declared return type 'array{files: array{'$comment': null|string, bigfilechunking: bool, blacklisted_files: list<mixed>, chunked_upload: array{max_parallel_count: int, max_size: int}, file_conversions: list<array{from: string, to: list<array{mime: string, name: string}>}>, forbidden_filename_basenames: list<string>, forbidden_filename_characters: list<string>, forbidden_filename_extensions: list<string>, forbidden_filenames: list<string>}}' for OCA\Files\Capabilities::getCapabilities is incorrect, got 'array{files: array{'$comment': '\"blacklisted_files\" is deprecated as of Nextcloud 30, use \"forbidden_filename...', bigfilechunking: true, blacklisted_files: list<string>, chunked_upload: array{max_parallel_count: int, max_size: int}, file_conversions: list<array{displayName: string, extension: string, from: string, to: string}>, forbidden_filename_basenames: list<string>, forbidden_filename_characters: list<string>, forbidden_filename_extensions: list<string>, forbidden_filenames: list<string>}}' which is different due to additional array shape fields (extension, displayName) (see https://psalm.dev/011)
|
InvalidReturnStatement:
apps/files/lib/Capabilities.php#L30
apps/files/lib/Capabilities.php:30:10: InvalidReturnStatement: The inferred type 'array{files: array{'$comment': '\"blacklisted_files\" is deprecated as of Nextcloud 30, use \"forbidden_filename...', bigfilechunking: true, blacklisted_files: list<string>, chunked_upload: array{max_parallel_count: int, max_size: int}, file_conversions: list<array{displayName: string, extension: string, from: string, to: string}>, forbidden_filename_basenames: list<string>, forbidden_filename_characters: list<string>, forbidden_filename_extensions: list<string>, forbidden_filenames: list<string>}}' does not match the declared return type 'array{files: array{'$comment': null|string, bigfilechunking: bool, blacklisted_files: list<mixed>, chunked_upload: array{max_parallel_count: int, max_size: int}, file_conversions: list<array{from: string, to: list<array{mime: string, name: string}>}>, forbidden_filename_basenames: list<string>, forbidden_filename_characters: list<string>, forbidden_filename_extensions: list<string>, forbidden_filenames: list<string>}}' for OCA\Files\Capabilities::getCapabilities due to additional array shape fields (extension, displayName) (see https://psalm.dev/128)
|
MoreSpecificReturnType:
lib/private/Files/Conversion/ConversionManager.php#L71
lib/private/Files/Conversion/ConversionManager.php:71:13: MoreSpecificReturnType: The declared return type 'list<OCP\Files\Conversion\ConversionMimeProvider>' for OC\Files\Conversion\ConversionManager::getProvidersForMime is more specific than the inferred return type 'array<int<0, max>, OCP\Files\Conversion\ConversionMimeProvider>' (see https://psalm.dev/070)
|
LessSpecificReturnStatement:
lib/private/Files/Conversion/ConversionManager.php#L82
lib/private/Files/Conversion/ConversionManager.php:82:10: LessSpecificReturnStatement: The type 'array<int<0, max>, OCP\Files\Conversion\ConversionMimeProvider>' is more general than the declared return type 'list<OCP\Files\Conversion\ConversionMimeProvider>' for OC\Files\Conversion\ConversionManager::getProvidersForMime (see https://psalm.dev/129)
|
static-code-analysis
Process completed with exit code 2.
|
TaintedFile:
lib/private/App/InfoParser.php#L38
lib/private/App/InfoParser.php:38:50: TaintedFile: Detected tainted file handling (see https://psalm.dev/255)
|
TaintedCallable:
lib/private/AppFramework/Http/Dispatcher.php#L200
lib/private/AppFramework/Http/Dispatcher.php:200:37: TaintedCallable: Detected tainted text (see https://psalm.dev/243)
|
TaintedInclude:
lib/private/Installer.php#L587
lib/private/Installer.php:587:12: TaintedInclude: Detected tainted code passed to include or similar (see https://psalm.dev/251)
|
TaintedFile:
lib/private/L10N/L10N.php#L215
lib/private/L10N/L10N.php:215:41: TaintedFile: Detected tainted file handling (see https://psalm.dev/255)
|
TaintedInclude:
lib/private/legacy/OC_App.php#L115
lib/private/legacy/OC_App.php:115:17: TaintedInclude: Detected tainted code passed to include or similar (see https://psalm.dev/251)
|
static-code-analysis-ncu
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
static-code-analysis-ocp
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
static-code-analysis
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
static-code-analysis-security
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|