From f1ed69f326ef53ce7946310c406abe18fb2e0733 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 9 Oct 2023 15:01:22 +0200 Subject: [PATCH 1/2] Fixed incorrect type-hint for Repository Exceptions contracts --- src/contracts/Persistence/Content/UrlAlias/Handler.php | 2 +- src/contracts/Repository/UserPreferenceService.php | 2 +- src/lib/Base/Container/ApiLoader/RepositoryFactory.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/contracts/Persistence/Content/UrlAlias/Handler.php b/src/contracts/Persistence/Content/UrlAlias/Handler.php index e4e4be40a8..1899770d73 100644 --- a/src/contracts/Persistence/Content/UrlAlias/Handler.php +++ b/src/contracts/Persistence/Content/UrlAlias/Handler.php @@ -204,7 +204,7 @@ public function deleteCorruptedUrlAliases(); * * @param int $locationId * - * @throws \Ibexa\Core\Base\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function repairBrokenUrlAliasesForLocation(int $locationId); } diff --git a/src/contracts/Repository/UserPreferenceService.php b/src/contracts/Repository/UserPreferenceService.php index c5400fb5e1..62ad0b2925 100644 --- a/src/contracts/Repository/UserPreferenceService.php +++ b/src/contracts/Repository/UserPreferenceService.php @@ -24,7 +24,7 @@ interface UserPreferenceService * @param \Ibexa\Contracts\Core\Repository\Values\UserPreference\UserPreferenceSetStruct[] $userPreferenceSetStructs * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException If the current user user is not allowed to set user preference - * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException If the $userPreferenceSetStruct is invalid + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the $userPreferenceSetStruct is invalid */ public function setUserPreference(array $userPreferenceSetStructs): void; diff --git a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php index c3703ee72b..3dbeec5971 100644 --- a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php +++ b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php @@ -121,7 +121,7 @@ public function buildRepository( * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param string $serviceName * - * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * * @return mixed */ From 6fe19c454c75a2389035504123fdde825e0c5714 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 11 Oct 2023 11:48:52 +0200 Subject: [PATCH 2/2] [PHPStan] Dropped obsolete error report in tests/.../FilterTest.php --- phpstan-baseline.neon | 5 ----- 1 file changed, 5 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6cf3b7b003..60485190d5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -62040,11 +62040,6 @@ parameters: count: 1 path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php - - - message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertContainsEquals\\(\\) with Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\SortClause\\\\Location\\\\Priority and array\\{\\} will always evaluate to false\\.$#" - count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\Filter\\\\FilterTest\\:\\:getComplexFilterTestData\\(\\) return type has no value type specified in iterable type iterable\\.$#" count: 1