Skip to content

Generate ext/dom class synopses based on stubs#839

Closed
kocsismate wants to merge 2 commits intophp:masterfrom
kocsismate:dom-classsynopses
Closed

Generate ext/dom class synopses based on stubs#839
kocsismate wants to merge 2 commits intophp:masterfrom
kocsismate:dom-classsynopses

Conversation

@kocsismate
Copy link
Copy Markdown
Member

@kocsismate kocsismate commented Aug 4, 2021

Generated via #839

@kocsismate
Copy link
Copy Markdown
Member Author

@salathe Can you please clarify your concerns?

@afilina afilina requested a review from salathe August 17, 2021 15:09
@salathe salathe removed their request for review August 17, 2021 15:31
@salathe
Copy link
Copy Markdown
Contributor

salathe commented Aug 17, 2021

On initially visually scanning the changes, I stopped reading when the very first file in the list (domattr.xml) looked to be introducing mistakes. (Whether they really are mistakes, or not, remains to be seen.)

At the time, I didn't have any particular desire to continue on down that rabbit hole, so just gave a thumbs down and moved on. I didn't reply to Máté, because I don't want to clarify my concerns. And now, I continue to not have any particular desire to go down this rabbit hole, and so won't be giving a review at this time either.

@cmb69
Copy link
Copy Markdown
Member

cmb69 commented Aug 17, 2021

A problem with reviewing this PR is that it is noisy (particularly the re-ordering of the properties). OTOH, it is done (based on?) an automated script, so later changes won't probably shuffle again. Still, a lot to review.

@kocsismate
Copy link
Copy Markdown
Member Author

kocsismate commented Aug 17, 2021

A problem with reviewing this PR is that it is noisy (particularly the re-ordering of the properties). OTOH, it is done (based on?) an automated script, so later changes won't probably shuffle again. Still, a lot to review.

Yes, the command I used is ./php-src/build/gen_stub.php --replace-classsynopses ./ext/dom ./ext/spl ./Zend/ ./ext/json ./doc-en/reference/dom

I agree that the property reordering makes the PR noisy. We could change the order of properties in php-src, but I'm not sure which order makes more sense, so I'm eager for suggestions. The only thing I'd like to avoid is to make manual adjustments to the generated output, since it would make subsequent class synopsis page regenerations very cumbersome, while otherwise we could syncronize the docs with future php-src changes basically by running a simple command.

@Girgias
Copy link
Copy Markdown
Member

Girgias commented Aug 17, 2021

This LGTM, I think its more likely the manual was mistaken than the stubs but it might just be wise to double checked all the mixed property types, as if they are readonly I would imagine that restricting their type should also be possible.

Copy link
Copy Markdown
Contributor

@salathe salathe left a comment

Choose a reason for hiding this comment

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

I managed to get past the first file this time (to 6/20 files), and there seem to be a few issues common to many files in this PR.

See inline comments for specific details.

General note

Reviewing this PR critically has been made more difficult than it really ought to be, due to the mixing of:
a) whitespace/formatting-only changes
b) consistency changes (e.g. adding xi:fallbacks)
c) re-ordering of lists of things (e.g. classref attributes, lists of things)
d) actual content changes (e.g. new interfaces, properties, etc.)

I have very likely missed issues in the latter (let's be honest, most important) category of changes due to the others, even in the few files I've looked through thus far. Also, if it's not clear already, please consider this review incomplete. I encourage other reviewers to cast a critial eye on these changes.

@kocsismate
Copy link
Copy Markdown
Member Author

consistency changes (e.g. adding xi:fallback)

When should I add xi:fallbacks elements? Currently, I always add them. What issue do extraneous fi:fallbacks cause?

@cmb69
Copy link
Copy Markdown
Member

cmb69 commented Sep 2, 2021

What issue do extraneous fi:fallbacks cause?

No issues per se, to my knowledge, but they can make reading the diffs harder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants