Skip to content

Commit

Permalink
[PHPDoc] Enhanced @deprecated usage (#458)
Browse files Browse the repository at this point in the history
For more details see #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()
  • Loading branch information
adriendupuis authored Dec 6, 2024
1 parent c45fb35 commit 5401414
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/contracts/FieldType/BinaryBase/PathGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/IO/BinaryFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
6 changes: 3 additions & 3 deletions src/contracts/Persistence/Content/ContentInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -122,7 +122,7 @@ class ContentInfo extends ValueObject
/**
* Status of the content.
*
* Replaces deprecated SPI\ContentInfo::$isPublished.
* Replaces deprecated {@see ContentInfo::$isPublished}.
*
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Persistence/Content/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5401414

Please sign in to comment.