Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance @deprecated usage #458

Merged
merged 7 commits into from
Dec 6, 2024
Merged

Enhance @deprecated usage #458

merged 7 commits into from
Dec 6, 2024

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Nov 22, 2024

🎫 Issue IBX-XXXXX

Related PRs:

ibexa/admin-ui#1398
ibexa/product-catalog#1205
ibexa/segmentation#109
ibexa/storefront#175

Description:

In @deprecated tags, add links to alternative elements to help navigate in PHP API Ref for future migration to 5.0.

Enhanceable entries were quickly found thanks to the hidden report https://doc.ibexa.co/en/latest/api/php_api/php_api_reference/reports/deprecated.html

Previews:

For QA:

Documentation:

@@ -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()}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's outside Contracts namespace so it won't generate a working link. But, it's still better than a reference to a gone class.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While fixing it, shouldn't we fix this also to follow other deprecation standards? (see PHP Conventions: deprecation standards on our internal wiki - not publicly linking it here on purpose).

Suggested change
* @deprecated Since 5.3.3, use {@see \Ibexa\Core\IO\IOServiceInterface::getMimeType()} or {@see \Ibexa\Core\IO\IOMetadataHandler::getMimeType()}
* @deprecated 5.3.3 Use {@see \Ibexa\Core\IO\IOServiceInterface::getMimeType()} or {@see \Ibexa\Core\IO\IOMetadataHandler::getMimeType()}

Copy link
Contributor Author

@adriendupuis adriendupuis Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alongosz

I wouldn't insist in this round on fixing the version indication. As you know, with the reboot of version numbers between eZ Publish and eZ Platform, it's a mess. Reading that it's deprecated since 5.3.3, while being on Ibexa DXP 4.6.x, already blows some minds. See #226 how hard it was with @since and never finished.

So, I'm agree that it should be fixed somehow, but not in this PR. I would keep this PR about linking to replacements.

@@ -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()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While fixing it, shouldn't we fix this also to follow other deprecation standards? (see PHP Conventions: deprecation standards on our internal wiki - not publicly linking it here on purpose).

Suggested change
* @deprecated Since 5.3.3, use {@see \Ibexa\Core\IO\IOServiceInterface::getMimeType()} or {@see \Ibexa\Core\IO\IOMetadataHandler::getMimeType()}
* @deprecated 5.3.3 Use {@see \Ibexa\Core\IO\IOServiceInterface::getMimeType()} or {@see \Ibexa\Core\IO\IOMetadataHandler::getMimeType()}

src/contracts/Persistence/Content/Handler.php Outdated Show resolved Hide resolved
@adriendupuis adriendupuis requested a review from alongosz December 5, 2024 13:28
@adriendupuis adriendupuis force-pushed the enh-deprecation-phpdoc branch from 84375fd to c420b60 Compare December 6, 2024 14:43
Copy link

sonarqubecloud bot commented Dec 6, 2024

@alongosz alongosz merged commit 5401414 into 4.6 Dec 6, 2024
22 checks passed
@alongosz alongosz deleted the enh-deprecation-phpdoc branch December 6, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants