Skip to content

Commit

Permalink
fix(ex_app_fetcher): use new OCP ServerVersion
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Borysenko <[email protected]>
  • Loading branch information
andrey18106 committed Sep 23, 2024
1 parent f25902e commit 1d95373
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/Fetcher/AppAPIFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use OCP\Files\NotPermittedException;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
use OCP\ServerVersion;
use OCP\Support\Subscription\IRegistry;
use Psr\Log\LoggerInterface;

Expand All @@ -35,7 +36,8 @@ public function __construct(
protected ITimeFactory $timeFactory,
protected IConfig $config,
protected LoggerInterface $logger,
protected IRegistry $registry
protected IRegistry $registry,
protected ServerVersion $serverVersion,

Check failure on line 40 in lib/Fetcher/AppAPIFetcher.php

View workflow job for this annotation

GitHub Actions / php-psalm-analysis (8.1)

UndefinedClass

lib/Fetcher/AppAPIFetcher.php:40:3: UndefinedClass: Class, interface or enum named OCP\ServerVersion does not exist (see https://psalm.dev/019)
) {
$this->appData = $appDataFactory->get('appstore');
}
Expand Down Expand Up @@ -184,7 +186,7 @@ public function setVersion(string $version): void {
*/
protected function getChannel(): string {
if ($this->channel === null) {
$this->channel = \OC_Util::getChannel();
$this->channel = $this->serverVersion->getChannel();

Check failure on line 189 in lib/Fetcher/AppAPIFetcher.php

View workflow job for this annotation

GitHub Actions / php-psalm-analysis (8.1)

UndefinedClass

lib/Fetcher/AppAPIFetcher.php:189:21: UndefinedClass: Class, interface or enum named OCP\ServerVersion does not exist (see https://psalm.dev/019)
}
return $this->channel;
}
Expand Down
7 changes: 5 additions & 2 deletions lib/Fetcher/ExAppFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
use OCP\ServerVersion;
use OCP\Support\Subscription\IRegistry;
use Psr\Log\LoggerInterface;

Expand All @@ -26,15 +27,17 @@ public function __construct(
IConfig $config,
CompareVersion $compareVersion,
LoggerInterface $logger,
protected IRegistry $registry
protected IRegistry $registry,
protected ServerVersion $serverVersion,

Check failure on line 31 in lib/Fetcher/ExAppFetcher.php

View workflow job for this annotation

GitHub Actions / php-psalm-analysis (8.1)

UndefinedClass

lib/Fetcher/ExAppFetcher.php:31:3: UndefinedClass: Class, interface or enum named OCP\ServerVersion does not exist (see https://psalm.dev/019)
) {
parent::__construct(
$appDataFactory,
$clientService,
$timeFactory,
$config,
$logger,
$registry
$registry,
$serverVersion
);

$this->compareVersion = $compareVersion;
Expand Down

0 comments on commit 1d95373

Please sign in to comment.