Skip to content

Fix rendering of attribute constants#249

Merged
kocsismate merged 2 commits intophp:masterfrom
kocsismate:fix-attribute-const-rendering
Mar 19, 2026
Merged

Fix rendering of attribute constants#249
kocsismate merged 2 commits intophp:masterfrom
kocsismate:fix-attribute-const-rendering

Conversation

@kocsismate
Copy link
Member

$this->cchunk["fieldsynopsis"]["modifier"] was not set for atrributes due to the early return, but this value is needed in order to be able to decide if the fieldsynopsis refers to a constant or a property at

if ($this->cchunk["fieldsynopsis"]["modifier"] === "const") {

$this->cchunk["fieldsynopsis"]["modifier"] was not set for atrributes due to the early return, but this value is needed in order to be able to decide if the fieldsynopsis refers to a constant or a property at https://github.com/php/phd/blob/d7f700463918a466705e92b4bfd4df0afa39d944/phpdotnet/phd/Package/Generic/XHTML.php#L1608
@Girgias
Copy link
Member

Girgias commented Mar 16, 2026

Could you add a test file? :)

@kocsismate kocsismate force-pushed the fix-attribute-const-rendering branch 3 times, most recently from fa2280b to eb1b0d2 Compare March 16, 2026 20:53
@kocsismate kocsismate force-pushed the fix-attribute-const-rendering branch from eb1b0d2 to b79ab5f Compare March 16, 2026 21:00
Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

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

makes sense as far as I understand it, but I don't fully understand it and haven't interacted with the phd system before, so not confident enough to actually approve it

@kocsismate kocsismate merged commit e546e7b into php:master Mar 19, 2026
11 checks passed
@kocsismate kocsismate deleted the fix-attribute-const-rendering branch March 19, 2026 21:08
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