Skip to content

feat: add support for PHP 8.3 typed class constants - #1136

Merged
czosel merged 1 commit into
glayzzle:mainfrom
Kenneth-Sills:kesills-typed-class-constants
Nov 6, 2024
Merged

feat: add support for PHP 8.3 typed class constants#1136
czosel merged 1 commit into
glayzzle:mainfrom
Kenneth-Sills:kesills-typed-class-constants

Conversation

@Kenneth-Sills

Copy link
Copy Markdown
Contributor

Related RFC.

Closes #1133

@ichiriac ichiriac left a comment

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.

👍

@czosel czosel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM as well, sorry about the massive delay and thanks for contributing @Kenneth-Sills!

@czosel
czosel merged commit 7a82704 into glayzzle:main Nov 6, 2024
Comment thread src/parser/class.js
}

const [nullable, type] =
this.version >= 830 ? this.read_optional_type() : [false, null];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe PHP 8.3 translate to version "803". See this comment and the implementation of version parsing.

@czosel czosel Dec 4, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Indeed, thanks for pointing that out! Fix: #1149 Looks like you already fixed it :-)

@czosel czosel mentioned this pull request Feb 22, 2026
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.

Fails to parse classes with typed constants

4 participants