Skip to content

gen_stub: various simplifications and clean up (6)#19699

Merged
DanielEScherzer merged 5 commits into
php:masterfrom
DanielEScherzer:stub-simplify-6
Mar 16, 2026
Merged

gen_stub: various simplifications and clean up (6)#19699
DanielEScherzer merged 5 commits into
php:masterfrom
DanielEScherzer:stub-simplify-6

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Member

Each commit can be reviewed independently, and should have no functional changes

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me otherwise

Comment thread build/gen_stub.php
Comment thread build/gen_stub.php Outdated

@kocsismate kocsismate left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM except for my nit and Arnaud's comment

@DanielEScherzer DanielEScherzer force-pushed the stub-simplify-6 branch 2 times, most recently from b9b4c1b to 37bddab Compare March 14, 2026 23:41
@DanielEScherzer

Copy link
Copy Markdown
Member Author

First force push - just a rebase (and accounting for the c-enum declarations handling): from 02a58efc80c08b4bf60ae9199d72c6310a9b6cd1 to b9b4c1b8b628508aa3f18b315e341bcb8525d1d2

Second, from b9b4c1b8b628508aa3f18b315e341bcb8525d1d2 to 37bddab0fa9058d90dba67d28c1149b5b5051e83, reverts the inlining FuncInfo::isFinalMethod() and adds the requested return types

Reduce the number of global functions by moving it to instance method
`FileInfo::generateArgInfoCode()`.

In the process, make the following parts of `FileInfo` private:

- `$funcInfos`
- `$generateFunctionEntries`
- `$declarationPrefix`
- `$generateClassEntries`
- `$generateCEnums`
- `::getMinimumPhpVersionIdCompatibility()`
@DanielEScherzer

Copy link
Copy Markdown
Member Author

(Rebased so that I could merge commits while still having them be signed)

@DanielEScherzer DanielEScherzer merged commit 25f62cf into php:master Mar 16, 2026
10 of 19 checks passed
@DanielEScherzer DanielEScherzer deleted the stub-simplify-6 branch March 16, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants