Repository navigation
feat: support clone with arguments - #306
Merged
Merged
Conversation
janwaleed09
force-pushed
the
feat/php85-clone-with
branch
from
September 29, 2026 14:05
1b584a5 to
5853b91
Compare
Contributor
Author
|
Hi @calebdw , friendly ping on this one. The CI needs your approval because it's my first PR here. On my fork it passes: https://github.com/janwaleed09/tree-sitter-php/actions/runs/36580018919 |
DavidBakerEffendi
added a commit
to BrokkAi/tree-sitter-php
that referenced
this pull request
Oct 5, 2026
Backport Jan Mohr's upstream PR tree-sitter#306 grammar change on the maintained 0.24.2 base, preserving promoted-property support, MIT attribution, and Brokk native symbols. Expose PHP 8.5 clone argument lists while retaining legacy clone ASTs. Regenerate both dialects with CLI 0.25.8 and cover positional/named arguments, callable cloning, full declaration ranges, and malformed syntax. Align release metadata at 0.24.4. Validation: exact-head Linux, Windows, and macOS CI plus lint passed; both full grammar corpora, Rust binding and differential regressions, package and publish dry runs passed. Reproduced the historical snippet and pinned Slink file with zero parser errors.
calebdw
force-pushed
the
feat/php85-clone-with
branch
2 times, most recently
from
October 6, 2026 16:21
5e0d8ed to
3384967
Compare
Adding those keywords to shared argument names made OBJECT a keyword in every call. WordPress passes that constant to get_post and get_term, so example parsing failed. Accept the keyword as a name unless a colon or call continues it.
tree-sitter/workflows release.yml no longer accepts `attestations`; provenance is always generated there. The extra input made the whole Publish packages workflow fail to start.
PHP 8.5 clone-with is a grammar addition, not a breaking change. ABI remains 15.
calebdw
force-pushed
the
feat/php85-clone-with
branch
from
October 6, 2026 16:37
3384967 to
0742412
Compare
calebdw
approved these changes
Oct 6, 2026
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for PHP 8.5 clone with arguments (RFC):
clone($x)still parses like before, same as in php-src.