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

IBX-4929: Fixed PhpDoc in various places #226

Merged
merged 11 commits into from
May 20, 2023
Merged

IBX-4929: Fixed PhpDoc in various places #226

merged 11 commits into from
May 20, 2023

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Apr 5, 2023

Question Answer
JIRA issue IBX-4929
Type improvement
Target Ibexa version v4.5
BC breaks no
  • Fix @since usage (Can I prefix eZ Publish era with 0.?)
Before After
@since eZ Platform 3.2 @since 3.2 eZ Platform 3.2 (ezplatform-kernel 1.2)
@since eZ Platform 3.0 @since 3.0 eZ Platform 3.0 (ezplatform-kernel 1.0)
@since v0.9.3 (removed) @since 1.13 eZ Platform 1.13 (ezplatform-http-cache 0.9.3) (ibexa/http-cache#36)
@since 6.12 @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12)
@since 6.0 @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
@since 5.4.5 @since 0.5.4.5 eZ Publish 5.4 (ezpublish-kernel 5.4)

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ibexa/engineering).

Adrien Dupuis added 4 commits April 4, 2023 14:33
Tag "see" with body "@see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::COMMON, \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED, \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK, \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD" has error "\Ibexa\Contracts\Core\Repository\Values\Content\Relation::COMMON," is not a valid Fqsen.
Tag "param" with body "@param callable(\Ibexa\Contracts\Core\Repository\Repository): T $callback" has error "\Ibexa\Contracts\Core\Repository\:" is not a valid Fqsen.
Tag "since" with body "@SInCE eZ Platform 3.0" has error
Tag "since" with body "@SInCE eZ Platform 3.2" has error
Adrien Dupuis added 5 commits April 7, 2023 12:19
Should have worked with inline @see tag according to https://docs.phpdoc.org/3.3/guide/references/phpdoc/tags/see.html#see but phpDocumentor may have difficulty with the inline version of @see phpDocumentor/phpDocumentor#1213 (comment)
Tag "see" with body "@see self::TYPE_*" has error "\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator\self::TYPE_*" is not a valid Fqsen.
@adriendupuis adriendupuis marked this pull request as ready for review April 13, 2023 07:24
@adriendupuis
Copy link
Contributor Author

@ibexa/php-dev As @ViniTou in ibexa/http-cache#36 (comment) I would say that we could remove those @since tag. What do you think?

@adriendupuis
Copy link
Contributor Author

adriendupuis commented Apr 13, 2023

There are several other @since in the repository which I didn't take care of. They are all followed by an ezsystems/ezpublish-kernel version.
The problem only appears with eZ Platform 3.0 and the rebranding to ezsystems/ezplatform-kernel which reset the version numbers then ibexa/core. That why I thought the DXP version number could help. …But platform version numbers are also reset during rebranding between eZ Publish and eZ Platform…

@ViniTou ViniTou requested a review from a team April 17, 2023 07:40
@alongosz alongosz changed the title IBX-4929: Fix PhpDoc IBX-4929: Fixed PhpDoc in various places Apr 17, 2023
@@ -28,7 +28,7 @@ interface RoleService
/**
* Creates a new RoleDraft.
*
* @since 6.0
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
Copy link
Member

Choose a reason for hiding this comment

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

This should rather be just @since eZ Platform 1.0. Technically we can remove it, but I think it requires more discussion within PHP Team.

Copy link
Contributor Author

@adriendupuis adriendupuis Apr 18, 2023

Choose a reason for hiding this comment

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

@alongosz

@since eZ Platform 1.0 causes the log entry Tag "since" with body "@since eZ Platform 1.0" has error.

https://docs.phpdoc.org/3.3/guide/references/phpdoc/tags/since.html defines in @since [<version>] [<description>] the version number argument as optional, but, in fact, it is mandatory with phpDocumentor 3.3.1 which is looking for digit and dots only as first argument.

It's only a log, no element skipped, the tag even renders properly. It could be kept as @since eZ Platform 1.0 with no or minimal annoyance.

Copy link
Member

Choose a reason for hiding this comment

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

I'm leaning towards dropping it entirely, at least for legacy Products. We can always infer that using git log. But I think we're planning internal sync with you about the entire PHP API Reference, aiming to discuss that as well.

src/lib/Pagination/Pagerfanta/SearchResultAdapter.php Outdated Show resolved Hide resolved
@alongosz alongosz requested a review from a team April 17, 2023 07:55
@sonarcloud
Copy link

sonarcloud bot commented Apr 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alongosz alongosz requested a review from a team May 19, 2023 08:30
@adamwojs adamwojs merged commit 4cb7de5 into main May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants