Make the usage of the role attribute more clear#9901
Merged
kocsismate merged 1 commit intophp:masterfrom Nov 10, 2022
Merged
Conversation
Member
|
I think in principle this makes sense. Although ideally we wouldn't be using |
cmb69
approved these changes
Nov 9, 2022
Member
cmb69
left a comment
There was a problem hiding this comment.
Yeah, what @Girgias said. We should update the skeletons and the docgen templates accordingly.
This was referenced Nov 10, 2022
kocsismate
added a commit
to kocsismate/doc-en
that referenced
this pull request
Nov 10, 2022
kocsismate
added a commit
to kocsismate/doc-en
that referenced
this pull request
Nov 10, 2022
This was referenced Nov 10, 2022
kocsismate
added a commit
to kocsismate/doc-en
that referenced
this pull request
Nov 10, 2022
This was referenced Nov 10, 2022
kocsismate
added a commit
to php/doc-en
that referenced
this pull request
Dec 11, 2022
kocsismate
added a commit
to php/doc-en
that referenced
this pull request
Dec 11, 2022
kocsismate
added a commit
to kocsismate/doc-en
that referenced
this pull request
Dec 11, 2022
kocsismate
added a commit
to php/doc-en
that referenced
this pull request
Dec 11, 2022
claudepache
pushed a commit
to claudepache/php-doc-en
that referenced
this pull request
Jun 1, 2023
claudepache
pushed a commit
to claudepache/php-doc-en
that referenced
this pull request
Jun 1, 2023
claudepache
pushed a commit
to claudepache/php-doc-en
that referenced
this pull request
Jun 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the role attribute is used to differentiate OO and procedural "aliases" when they are documented on the same page (e.g. https://www.php.net/manual/en/datetime.diff.php). However, these function-method counterparts are not always aliases in fact according to the stubs (#9491). That's why sometimes the usage of the role attribute is ambiguous, thus syncing the manual with the stubs results in false positive diffs.
This PR fixes the problem by a very obtrusive way: by changing the value of all
role="oop"attributes to the actual class name, likerole="DateTime", and by getting rid of allrole="procedural"attributes as they became unnecessary. This way, class synopsis pages can clearly reference methods, and skip functions.By having this PR, we can get rid of quite a few false positive diff between the output of gen_stub.php and the manual, most notably in ext/mysqli, ext/date and ext/curl. On the other hand, it will take a lot of followup changes in the manual to actually get rid of the diff. :(