Skip to content

[PHP 8.3] Mention final modifier for methods coming from traits#4167

Merged
Girgias merged 1 commit into
php:masterfrom
alexandre-daubois:traits-final-method
Nov 28, 2024
Merged

[PHP 8.3] Mention final modifier for methods coming from traits#4167
Girgias merged 1 commit into
php:masterfrom
alexandre-daubois:traits-final-method

Conversation

@alexandre-daubois
Copy link
Copy Markdown
Member

Part of #2796

@alexandre-daubois alexandre-daubois changed the title Mention final modifier for methods coming from traits [PHP 8.3] Mention final modifier for methods coming from traits Nov 27, 2024
Copy link
Copy Markdown
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.

Thank you, minor XML nit and one remark about a link but LGTM to me otherwise

Comment thread language/oop5/traits.xml Outdated
Comment on lines +550 to +553
<para>
As of PHP 8.3.0, the <literal>final</literal> modifier can
be applied to methods coming from traits.
</para>
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.

Maybe the final should also link to the final documentation page?

Suggested change
<para>
As of PHP 8.3.0, the <literal>final</literal> modifier can
be applied to methods coming from traits.
</para>
<simpara>
As of PHP 8.3.0, the <literal>final</literal> modifier can
be applied to methods coming from traits.
</simpara>

Copy link
Copy Markdown
Member Author

@alexandre-daubois alexandre-daubois Nov 28, 2024

Choose a reason for hiding this comment

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

Thanks! What the rule to decide whether para or simpara should be used?

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.

New style guide says to prefer <simpara> as it corresponds to a HTML <p> tag, a <para> tag allows including more complex tags inside of it (e.g. <methodsynopsis>, <simplelist>), and thus we render it as a <div>.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Got it, thank you!

@Girgias Girgias added this to the PHP 8.3 milestone Nov 27, 2024
@Girgias Girgias merged commit 88918fd into php:master Nov 28, 2024
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.

2 participants