diff --git a/extensions/package-manager/src/Api/Resource/ExternalExtensionResource.php b/extensions/package-manager/src/Api/Resource/ExternalExtensionResource.php index b5abb570e6..a4f1063ee5 100644 --- a/extensions/package-manager/src/Api/Resource/ExternalExtensionResource.php +++ b/extensions/package-manager/src/Api/Resource/ExternalExtensionResource.php @@ -133,13 +133,13 @@ public function filters(): array public function query(Context $context): object { return (new RequestWrapper($this->cache, 'https://flarum.org/api/extensions', 'GET', null, [ - 'Accept' => 'application/json', - ]))->withQueryParams([ - 'filter' => [ - // @todo - 'compatible-with' => '1.8.6', // Application::VERSION, - ], - ]); + 'Accept' => 'application/json', + ]))->withQueryParams([ + 'filter' => [ + // @todo + 'compatible-with' => '1.8.6', // Application::VERSION, + ], + ]); } public function paginate(object $query, OffsetPagination $pagination): void @@ -156,7 +156,6 @@ public function paginate(object $query, OffsetPagination $pagination): void public function results(object $query, Context $context): iterable { /** @var RequestWrapper $query */ - $json = $query->cache(function (RequestWrapper $query) { try { $response = (new Client())->send($query->getRequest()); diff --git a/extensions/package-manager/src/Api/Schema/SortColumn.php b/extensions/package-manager/src/Api/Schema/SortColumn.php index 467f265c6d..8758700081 100644 --- a/extensions/package-manager/src/Api/Schema/SortColumn.php +++ b/extensions/package-manager/src/Api/Schema/SortColumn.php @@ -1,5 +1,12 @@ request->$name(...$arguments); $this->request = $new; + return $this; } diff --git a/extensions/package-manager/tests/integration/TestCase.php b/extensions/package-manager/tests/integration/TestCase.php index 2bd626a7b6..7175ff3f16 100644 --- a/extensions/package-manager/tests/integration/TestCase.php +++ b/extensions/package-manager/tests/integration/TestCase.php @@ -12,7 +12,6 @@ use Flarum\Extension\Extension; use Flarum\ExtensionManager\Composer\ComposerAdapter; use Flarum\ExtensionManager\Composer\ComposerJson; -use Flarum\ExtensionManager\Support\Util; use Flarum\Foundation\Paths; use Flarum\Testing\integration\RetrievesAuthorizedUsers; use Illuminate\Support\Arr; diff --git a/framework/core/src/Api/Resource/AbstractDatabaseResource.php b/framework/core/src/Api/Resource/AbstractDatabaseResource.php index 2967b0a257..1968d6d82e 100644 --- a/framework/core/src/Api/Resource/AbstractDatabaseResource.php +++ b/framework/core/src/Api/Resource/AbstractDatabaseResource.php @@ -330,7 +330,7 @@ public function newModel(Context $context): object return new ($this->model()); } - public final function filters(): array + final public function filters(): array { throw new RuntimeException('Not supported in Flarum, please use a model searcher instead https://docs.flarum.org/extend/search.'); }