Repository navigation
gen_stub: Skip non-refentry documents and manual synopses in stub generation - #25883
Open
jordikroon wants to merge 2 commits into
Open
jordikroon wants to merge 2 commits into
jordikroon wants to merge 2 commits into
Conversation
kocsismate
reviewed
Nov 28, 2026
| $documentedFuncMap[$funcInfo->name->__toString()] = $funcInfo->name->__toString(); | ||
|
|
||
| // Hand-maintained synopses are never regenerated | ||
| if ($methodSynopsis->getAttribute("condition") === "manual") { |
Member
There was a problem hiding this comment.
personally, I find the "manual" value a bit ambiguous in the context of the PHP manual 😅 I could imagine using some other value, like no-auto-update or similar.
Member
Author
There was a problem hiding this comment.
Okay, that's fair enough. How about stub-override? I prefer to write it's purpose rather than the instruction.
Member
There was a problem hiding this comment.
I don't like my suggestion, but I didn't have an AHA! moment when reading stub-override either. Not bad, but not the best one. :) either way, let's wait a little bit in the hope that someone else will chime in with another idea.
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.
gen_stub.php overwrites every methodsynopsis it can match by name. Some of these don't match the stubs on purpose.
For example the extra signatures of overloaded functions and methods or old signatures in the 7.3 and 8.2 migration guides.
This PR skips
condition="manual"and non-refentry documents. The latter as a fix to skip migration documents.See: php/doc-en#6170