Skip to content

gen_stub: Generate useful methodsynopsises #12330

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

Merged
merged 15 commits into from
Oct 31, 2023

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Sep 30, 2023

So that they can be used as a starting point for new functions/methods.

This feels like this should be spun out into some other file really... as gen_stub.php is already quite convolute and difficult to understand.

@Girgias Girgias force-pushed the gen_stub_generate_method_synopsis branch from 9f97023 to 7c6fe5e Compare September 30, 2023 18:39
@Girgias Girgias marked this pull request as ready for review September 30, 2023 19:08
@Girgias Girgias requested a review from kocsismate September 30, 2023 19:08
Copy link
Member

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

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

Awesome! Originally, I didn't add support for this feature, because Christoph was against (since there is also the docgen.php). But I think moving this functionality into gen_stub.php makes sense, since docgen.php will never have so much reflection information as gen_stub.php has based on the stubs, so it won't be able to generate an entirely correct page.

P.S. Are you also interested in doing the same for class synopsis pages? ^^

@Girgias
Copy link
Member Author

Girgias commented Sep 30, 2023

Awesome! Originally, I didn't add support for this feature, because Christoph was against (since there is also the docgen.php). But I think moving this functionality into gen_stub.php makes sense, since docgen.php will never have so much reflection information as gen_stub.php has based on the stubs, so it won't be able to generate an entirely correct page.

P.S. Are you also interested in doing the same for class synopsis pages? ^^

I will have a look at class synopsises later, it would be nice if it also supports generating enums as 8.3 introduces a native one

@Girgias Girgias force-pushed the gen_stub_generate_method_synopsis branch from c58af0a to 6929af3 Compare October 28, 2023 13:32
@Girgias Girgias force-pushed the gen_stub_generate_method_synopsis branch from 6929af3 to fd27419 Compare October 31, 2023 11:19
@kocsismate
Copy link
Member

This looks good to me with the exception of one small comment I posted a few minutes ago. :) I'm looking forward to using this feature!

Girgias and others added 14 commits October 31, 2023 11:35
So that they can be used as a starting point for new functions/methods.
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
Do not emit a return value section for constructors and destructors
Improve ID and refname generation for methods and support functions (?)
Use a creative solution because libxml otherwise forces xmlns to be the first one
We can just lowercase the result instead of doing each part before
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
@Girgias Girgias force-pushed the gen_stub_generate_method_synopsis branch from fd27419 to e22e0e6 Compare October 31, 2023 11:57
@Girgias Girgias merged commit 5d98069 into php:master Oct 31, 2023
@Girgias Girgias deleted the gen_stub_generate_method_synopsis branch October 31, 2023 19:45
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.

2 participants