Skip to content

Conversation

@Roardom
Copy link

@Roardom Roardom commented Dec 16, 2025

To v0.24.2 and v0.1.7 respectively. Enables features of PHP 8.4 and 8.5.

To v0.24.2 and v0.1.7 respectively. Enables features of PHP 8.4 and 8.5.

- tree-sitter/tree-sitter-php#275
  - `php_end_tag` was added
  - `callable` is no longer a keyword
- tree-sitter/tree-sitter-php#237
  - `string_value` was replaced with `string_content`
  - `modifier` field was removed from `class_declaration`
- Various
  - `yield` and `from` are converted to `yield` and `yield from`
@cla-bot
Copy link

cla-bot bot commented Dec 16, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @Roardom on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@Roardom
Copy link
Author

Roardom commented Dec 16, 2025

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Dec 16, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @Roardom on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link

cla-bot bot commented Dec 16, 2025

The cla-bot has been summoned, and re-checked this pull request!

@Roardom
Copy link
Author

Roardom commented Dec 16, 2025

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Dec 16, 2025
@cla-bot
Copy link

cla-bot bot commented Dec 16, 2025

The cla-bot has been summoned, and re-checked this pull request!

Comment on lines -7 to +9
modifier: (_)? @_modifier
(#not-eq? @_modifier "abstract")
(_)* @_modifier
(#not-any-eq? @_modifier "abstract")
.
Copy link
Author

Choose a reason for hiding this comment

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

I'm not entirely sure about this change. The grammar no longer defines a modifier field, but does this instead:

https://github.com/tree-sitter/tree-sitter-php/blob/7d07b41ce2d442ca9a90ed85d0075eccc17ae315/common/define-grammar.js#L345-L353

I don't use runnables nor phpunit so not sure where to look to make sure the queries are correct.

@Roardom
Copy link
Author

Roardom commented Dec 16, 2025

fixes #86

@Roardom Roardom marked this pull request as draft December 17, 2025 23:22
@Roardom
Copy link
Author

Roardom commented Dec 17, 2025

Converted to draft as the phpdoc grammar is still receiving some fixes for the latest php grammar version and might have to be updated some more.

@MrSubidubi MrSubidubi changed the title update tree-sitter-php and tree-sitter-phpdoc grammars Update PHP and PHPDoc grammars Dec 30, 2025
@MrSubidubi
Copy link
Contributor

Hey, thanks for the PR! We'd love to have this, is there any update on the upstream grammar fixes?

@MrSubidubi MrSubidubi added the awaiting info Issue that needs more information from the user label Jan 28, 2026
@Roardom
Copy link
Author

Roardom commented Jan 28, 2026

Honestly I've been using these grammars locally for the past month and haven't noticed any issues (I might just be looking in the wrong place). I can take a look at rebasing this branch later today.

@MrSubidubi
Copy link
Contributor

That would be awesome, thanks!

@MrSubidubi MrSubidubi removed the awaiting info Issue that needs more information from the user label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants