From c45fb35c838de8bdcc7044101322143f7f87f4bd Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 6 Dec 2024 15:42:40 +0100 Subject: [PATCH 1/2] [PHPStan] Aligned baseline after PHPStan release (#459) For more details see https://github.com/ibexa/core/pull/459 --- phpstan-baseline-gte-8.0.neon | 5 ----- phpstan-baseline.neon | 5 ----- 2 files changed, 10 deletions(-) diff --git a/phpstan-baseline-gte-8.0.neon b/phpstan-baseline-gte-8.0.neon index f4d695d9ca..e65db45872 100644 --- a/phpstan-baseline-gte-8.0.neon +++ b/phpstan-baseline-gte-8.0.neon @@ -445,11 +445,6 @@ parameters: count: 12 path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - - message: "#^Trying to invoke Closure\\|null but it might not be a callable\\.$#" - count: 2 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php - - message: "#^Parameter \\#1 \\$array of function key expects array\\|object, string given\\.$#" count: 4 diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 64cf9f0188..4df9ba14c0 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -9465,11 +9465,6 @@ parameters: count: 1 path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - message: "#^Cannot call method warning\\(\\) on Psr\\\\Log\\\\LoggerInterface\\|null\\.$#" - count: 2 - path: src/lib/FieldType/Image/ImageThumbnailStrategy.php - - message: "#^Parameter \\#3 \\$pad_string of function str_pad expects string, int given\\.$#" count: 1 From 54014140a561a7e21bdf62dd30f5f8b0d228bb10 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:33:20 +0100 Subject: [PATCH 2/2] [PHPDoc] Enhanced `@deprecated` usage (#458) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://github.com/ibexa/core/pull/458 Key changes: * ContentInfo.php: added links to `@deprecated` alternatives * Handler.php: added links to `@deprecated` alternatives * PathGenerator.php: added links to `@deprecated` alternatives * BinaryFile.php: BinaryFile::$mimeType → IOMetadataHandler::getMimeType() * BinaryFile.php: BinaryFile::$mimeType → IOServiceInterface::getMimeType() --- src/contracts/FieldType/BinaryBase/PathGenerator.php | 2 +- src/contracts/IO/BinaryFile.php | 2 +- src/contracts/Persistence/Content/ContentInfo.php | 6 +++--- src/contracts/Persistence/Content/Handler.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/contracts/FieldType/BinaryBase/PathGenerator.php b/src/contracts/FieldType/BinaryBase/PathGenerator.php index 1b2271c930..756f7cd1c8 100644 --- a/src/contracts/FieldType/BinaryBase/PathGenerator.php +++ b/src/contracts/FieldType/BinaryBase/PathGenerator.php @@ -10,7 +10,7 @@ use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; /** - * @deprecated use \Ibexa\Contracts\Core\FieldType\BinaryBase\PathGeneratorInterface instead. + * @deprecated use {@see \Ibexa\Contracts\Core\FieldType\BinaryBase\PathGeneratorInterface} instead. */ abstract class PathGenerator implements PathGeneratorInterface { diff --git a/src/contracts/IO/BinaryFile.php b/src/contracts/IO/BinaryFile.php index 5f292d1422..297a1bb60d 100644 --- a/src/contracts/IO/BinaryFile.php +++ b/src/contracts/IO/BinaryFile.php @@ -48,7 +48,7 @@ class BinaryFile * * Example: text/xml * - * @deprecated Since 5.3.3, use IO\Handler::getMimeType() + * @deprecated Since 5.3.3, use {@see \Ibexa\Core\IO\IOServiceInterface::getMimeType()} or {@see \Ibexa\Core\IO\IOMetadataHandler::getMimeType()} * * @var string */ diff --git a/src/contracts/Persistence/Content/ContentInfo.php b/src/contracts/Persistence/Content/ContentInfo.php index 5d247fc73e..c372259571 100644 --- a/src/contracts/Persistence/Content/ContentInfo.php +++ b/src/contracts/Persistence/Content/ContentInfo.php @@ -19,7 +19,7 @@ class ContentInfo extends ValueObject public const STATUS_PUBLISHED = 1; public const STATUS_TRASHED = 2; - /** @deprecated Use ContentInfo::STATUS_TRASHED */ + /** @deprecated Use {@see ContentInfo::STATUS_TRASHED} */ public const STATUS_ARCHIVED = self::STATUS_TRASHED; /** @@ -59,7 +59,7 @@ class ContentInfo extends ValueObject public $currentVersionNo; /** - * @deprecated Use SPI\ContentInfo::$status (with value ContentInfo::STATUS_PUBLISHED) + * @deprecated Use {@see ContentInfo::$status} (with value {@see ContentInfo::STATUS_PUBLISHED}) * * Flag indicating if content is currently published. * @@ -122,7 +122,7 @@ class ContentInfo extends ValueObject /** * Status of the content. * - * Replaces deprecated SPI\ContentInfo::$isPublished. + * Replaces deprecated {@see ContentInfo::$isPublished}. * * @var int */ diff --git a/src/contracts/Persistence/Content/Handler.php b/src/contracts/Persistence/Content/Handler.php index 5bfb72ed37..837f12a4be 100644 --- a/src/contracts/Persistence/Content/Handler.php +++ b/src/contracts/Persistence/Content/Handler.php @@ -283,7 +283,7 @@ public function removeRelation($relationId, $type, ?int $destinationContentId = /** * Loads relations from $sourceContentId. Optionally, loads only those with $type and $sourceContentVersionNo. * - * @deprecated 4.5.7 The "ContentService::loadRelations()" method is deprecated, will be removed in 5.0. + * @deprecated 4.5.7 It will be removed in 5.0. Use {@see \Ibexa\Contracts\Core\Repository\ContentService::loadRelationList()} instead. * * @param mixed $sourceContentId Source Content ID * @param mixed|null $sourceContentVersionNo Source Content Version, null if not specified