Skip to content
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

Hooks documentation #4094

Merged
merged 25 commits into from
Nov 20, 2024
Merged

Hooks documentation #4094

merged 25 commits into from
Nov 20, 2024

Conversation

Crell
Copy link
Contributor

@Crell Crell commented Nov 18, 2024

This is now ready for content review. Should be mergeable.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

I have only reviewed the XML markup for the moment

Comment on lines +324 to +329
<row xml:id="constant.property">
<entry><constant>__PROPERTY__</constant></entry>
<entry>
Only valid inside a <link linkend="language.oop5.property-hooks">property hook</link>. It is equal to the name of the property.
</entry>
</row>
Copy link
Member

Choose a reason for hiding this comment

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

Note this also adds the T_PROPERTY_C token to the tokenizer extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I... don't know what that means? Is that something relevant for the docs?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, in that it needs to be documented in the appendices/tokens.xml file/page :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to leave this one to @iluuu1994, since he knows what it actually does.

Copy link
Member

Choose a reason for hiding this comment

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

Do I still need to do something here? Are we documenting individual tokens?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to @Girgias, we need something about T_PROPERTY_C in appendices/tokens.xml. I have no idea what that would be or what it means. I can review and merge a PR from you, however. :-)

Copy link
Member

Choose a reason for hiding this comment

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

I've already documented this.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you Gina!

language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
@Crell
Copy link
Contributor Author

Crell commented Nov 19, 2024

I think this covers the hooks page itself. Interfaces and abstract classes I think should go on their own pages.

@Crell Crell marked this pull request as ready for review November 19, 2024 06:23
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Also please change all new <para> to <simpara> as it doesn't seem like you are nesting any complicated tags inside of them.

language/oop5/variance.xml Outdated Show resolved Hide resolved
language/oop5/interfaces.xml Outdated Show resolved Hide resolved
language/oop5/interfaces.xml Outdated Show resolved Hide resolved
language/oop5/interfaces.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
@Crell
Copy link
Contributor Author

Crell commented Nov 20, 2024

I updated para to simpara in the new file. I didn't change the existing files, as IMO making the files a mix of para and simpara is even worse, and changing the whole file is scope creep. We can/should do that separately in another PR.

I still don't know why the build is failing, as the error messages are unhelpful. It's some kind of not-property-structured XML, I suspect, but XML is very bad about telling you where the actual problem is. 😢

... OK, now it's not failing on CI, but it is still failing for me locally. Whatever.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Minor nits but otherwise LGTM.

language/oop5/abstract.xml Show resolved Hide resolved
language/oop5/abstract.xml Outdated Show resolved Hide resolved
language/oop5/abstract.xml Outdated Show resolved Hide resolved
language/oop5/abstract.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
language/oop5/property-hooks.xml Outdated Show resolved Hide resolved
Co-authored-by: Gina Peter Banyard <girgias@php.net>
@Girgias Girgias merged commit f9dabde into php:master Nov 20, 2024
2 checks passed
@Crell Crell deleted the hooks branch November 21, 2024 05:20
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.

3 participants