diff --git a/.github/workflows/update-psalm-baseline.yml b/.github/workflows/update-psalm-baseline.yml index a31128042a192..440fc88e09a4a 100644 --- a/.github/workflows/update-psalm-baseline.yml +++ b/.github/workflows/update-psalm-baseline.yml @@ -28,7 +28,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: '8.0' - extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip + extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip coverage: none env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -37,11 +37,11 @@ jobs: run: composer install - name: Psalm - run: composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline + run: composer run psalm:ci -- --monochrome --no-progress --output-format=text --update-baseline continue-on-error: true - name: Psalm OCP - run: composer run psalm -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline + run: composer run psalm:ci -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline continue-on-error: true - name: Reset composer diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index ba52909148299..81ca36f15a57c 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -2,7 +2,7 @@ - $calendarData + $data @@ -17,7 +17,7 @@ - $vcardData + $data @@ -38,26 +38,6 @@ array - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - $uids @@ -66,11 +46,6 @@ ]]> - - - IEventListener - - $baseuri @@ -107,7 +82,7 @@ - CalendarDeletionDefaultUpdaterListener::class + registerEventListener @@ -122,11 +97,6 @@ VEVENT->SUMMARY]]> - - - $calendarData - - objectData['calendardata']]]> @@ -342,7 +312,7 @@ - is_array($modified['old']) + @@ -353,8 +323,8 @@ - [$aclPlugin, 'propFind'] - [$aclPlugin, 'propFind'] + + DTEND]]> @@ -389,12 +359,12 @@ - !is_array($newProps['filters']['comps']) - !is_array($newProps['filters']['params']) - !is_array($newProps['filters']['props']) - !isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps']) - !isset($newProps['filters']['params']) || !is_array($newProps['filters']['params']) - !isset($newProps['filters']['props']) || !is_array($newProps['filters']['props']) + + + + + + @@ -430,7 +400,7 @@ VCard - $addressBooks[$row['id']][$readOnlyPropertyName] === 0 + @@ -439,9 +409,6 @@ - - string - $type, @@ -451,23 +418,12 @@ false|array{body: string, Content-Type: string} - - $type - string|null - - - getChanges - - - null - - principalUri]]> @@ -541,13 +497,12 @@ 0 - 200 bool - new PreconditionFailed('Cannot filter by non-existing tag', 0, $e) + \OCA\Circles\Api\v1\Circles @@ -596,12 +551,6 @@ \OCA\Circles\Api\v1\Circles - - - getPath - getPath - - new \OCA\DAV\Connector\Sabre\QuotaPlugin($view, true) @@ -704,66 +653,6 @@ usersToDelete]]> - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - $arguments @@ -879,7 +768,7 @@ - get_class($res) === 'OpenSSLAsymmetricKey' + @@ -894,7 +783,7 @@ - new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0) + @@ -922,7 +811,7 @@ $shareId $shareId $shareId - (int)$data['id'] + $nodes[0] @@ -931,11 +820,6 @@ \OCP\Files\File|\OCP\Files\Folder - - - IEventListener - - bool @@ -957,7 +841,7 @@ string - (int)$share['id'] + @@ -968,19 +852,6 @@ ]]> - - - IEventListener - - - - - dbHandler->getAllServer()]]> - - - ]]> - - $files_list @@ -1046,16 +917,6 @@ $i - - - IEventListener - - - - - IEventListener - - empty($encryptedFiles) @@ -1108,21 +969,6 @@ fopen - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - login @@ -1173,26 +1019,6 @@ $cacheData - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - getMessage()]]> @@ -1243,15 +1069,10 @@ - $_['hideFileList'] !== true + - - - IEventListener - - int @@ -1318,21 +1139,6 @@ $this - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - getChild @@ -1367,20 +1173,12 @@ $groupid === null - - - IEventListener - - Response - - AppPasswordCreatedActivityListener::class - getSettingsManager @@ -1395,21 +1193,6 @@ getEMailAddress() => $user->getDisplayName()]]]> - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - isReady @@ -1423,7 +1206,7 @@ getId()]]> - (int)$data['id'] + @@ -1437,16 +1220,6 @@ TIME_SENSITIVE - - - IEventListener - - - - - IEventListener - - getRgb())]]> @@ -1455,36 +1228,6 @@ array{0: int, 1: int, 2: int} - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - false @@ -1601,21 +1344,6 @@ registerProvider - - - IEventListener - - - - - IEventListener - - - - - IEventListener - - null @@ -1663,14 +1391,6 @@ string - - $uid - - - - - IEventListener - @@ -1815,11 +1535,6 @@ findMatchingRoute - - - IEventListener - - request->server]]> @@ -1908,11 +1623,8 @@ - - $values - - $default + fastCache[$app][$key] ?? $default]]> @@ -1934,7 +1646,6 @@ \OCP\IServerContainer - mixed getAppDataDir @@ -2005,7 +1716,7 @@ - $action['url-postfix'] + @@ -2041,6 +1752,11 @@ try { return $this->query($resolveName); } catch (QueryException $e2) { + // Pass null if typed and nullable + if ($parameter->allowsNull() && ($parameterType instanceof ReflectionNamedType)) { + return null; + } + // don't lose the error we got while trying to query by type throw new QueryException($e->getMessage(), (int) $e->getCode(), $e); } @@ -2065,30 +1781,11 @@ tar->extractInString($path)]]> - - - IEventListener - - - - - IEventListener - - $trySession - - - DO_NOT_REMEMBER - PERMANENT_TOKEN - REMEMBER - TEMPORARY_TOKEN - WIPE_TOKEN - - getExpires @@ -2155,7 +1852,7 @@ $image - $image + ($newImage !== false) ? $newImage : $image GdImage|false @@ -2216,16 +1913,8 @@ - [LaravelClosure::class, OpisClosure::class] + [LaravelClosure::class] - - $serializedCallable - - - - - $serializedCommand - @@ -2257,7 +1946,7 @@ getParams - $params['collation'] + @@ -2268,8 +1957,8 @@ $params - $params['adapter'] - $params['tablePrefix'] + + @@ -2302,7 +1991,7 @@ getParams - $params['collation'] + @@ -2497,10 +2186,10 @@ $user - get_class($provider) !== 'OCA\Files_Sharing\MountProvider' + - get_class($provider) === 'OCA\Files_Sharing\MountProvider' + @@ -2675,7 +2364,7 @@ Promise\promise_for( new Credentials($key, $secret) ) - \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()) + @@ -2866,11 +2555,6 @@ getContent())]]> - - - IEventListener - - bool @@ -2881,9 +2565,6 @@ $users - - $user - \OC\User\User[] @@ -2926,16 +2607,13 @@ - - false - false false - $app['path'] - $app['path'] + + null @@ -3168,11 +2846,6 @@ $out - - - $out - - \OC_APP @@ -3288,8 +2961,7 @@ - $content !== '' - $type === 'pdo' + $vendor @@ -3319,7 +2991,7 @@ getId()]]> getId()]]> - (int)$data['id'] + set @@ -3392,9 +3064,6 @@ - - $stream - get @@ -3477,11 +3146,6 @@ false - - - IEventListener - - IUser|false @@ -3525,15 +3189,12 @@ $groupsList - $dir['path'] - $dir['url'] + + null - - null - $appId === null $appId === null @@ -3607,6 +3268,15 @@ array{X-Request-Id: string, Cache-Control: string, Content-Security-Policy: string, Feature-Policy: string, X-Robots-Tag: string, Last-Modified?: string, ETag?: string, ...H} + + + DO_NOT_REMEMBER + PERMANENT_TOKEN + REMEMBER + TEMPORARY_TOKEN + WIPE_TOKEN + + \ArrayAccess diff --git a/composer.json b/composer.json index 3082f5c7a4adc..48598e0c5a4d2 100644 --- a/composer.json +++ b/composer.json @@ -68,5 +68,11 @@ "test": "phpunit --configuration tests/phpunit-autotest.xml", "test:db": "@composer run test -- --group DB,SLOWDB", "test:files_external": "phpunit --configuration tests/phpunit-autotest-external.xml" + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } } }