Skip to content

feat: add PHP 8.5 pipe operator - #274

Merged
calebdw merged 6 commits into
masterfrom
calebdw/push-wqttnrqlwoql
Jun 2, 2025
Merged

calebdw merged 6 commits into
masterfrom
calebdw/push-wqttnrqlwoql

Conversation

@calebdw

@calebdw calebdw commented May 30, 2025 •

Copy link
Copy Markdown
Collaborator

@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch from fbb3bcc to c32bb69 Compare May 30, 2025 12:01
@clason

clason commented May 30, 2025

Copy link
Copy Markdown
Member

You need to tree-sitter init --update the bindings to make them ABI 15 compatible.

@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch 2 times, most recently from 03a604b to 2584043 Compare May 30, 2025 12:36
@calebdw

calebdw commented May 30, 2025

Copy link
Copy Markdown
Collaborator Author

You need to tree-sitter init --update the bindings to make them ABI 15 compatible.

and here I was doing it all manually 🙃

@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch from 2584043 to f96e31d Compare May 30, 2025 13:01
@calebdw
calebdw requested review from amaanq and cfroystad May 30, 2025 13:03
@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch 2 times, most recently from 7d0f2f3 to 1f9e36b Compare May 30, 2025 13:16
@clason

clason commented May 30, 2025

Copy link
Copy Markdown
Member

Python bindings don't support ABI 15, period. Gotta disable the tests for it.

@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch 2 times, most recently from 7e8628d to 581d5a2 Compare May 30, 2025 13:40
@calebdw

calebdw commented May 30, 2025

Copy link
Copy Markdown
Collaborator Author

Neither does swift apparently

@clason

clason commented May 30, 2025

Copy link
Copy Markdown
Member

Doesn't surprise me. I consider the bindings vestigial and don't pay them any attention.

@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch 2 times, most recently from 9ba6933 to 0e3959d Compare May 30, 2025 22:17
@calebdw calebdw changed the title feat: add support for PHP 8.5 pipe operator feat: add PHP 8.5 pipe operator; reserved keywords May 30, 2025
@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch 9 times, most recently from b5ba7f6 to 53a3a7d Compare June 1, 2025 03:09
@calebdw

calebdw commented Jun 1, 2025

Copy link
Copy Markdown
Collaborator Author

@amaanq, I've mostly finished out your reserved keywords work, but I'm having issues with:

  • global constants not erroring when using a restricted name (const FOREACH = 1;)
  • class constants when using a type as the name (this is allowed, public const STRING = 'foo';)

you can see the failures in ci. If you have the time and are willing, could you please take a look? I've tried just about everything I know to do so I'm running out of ideas.

I can split this PR up if that helps.

Thanks!

Comment thread log.html Resolved
Comment thread queries/highlights.scm Resolved
@clason

clason commented Jun 1, 2025

Copy link
Copy Markdown
Member

Generally, I would recommend splitting up PRs as much as possible -- that makes them much easier to review and allows quickly merging non-controversial parts.

In this case, you could separate:

  • chore: CI updates
  • feat: add pipe operator
  • feat!: bump parser to ABI 15 and regenerate bindings
  • feat: add reserved words

@calebdw
calebdw force-pushed the calebdw/push-wqttnrqlwoql branch from 53a3a7d to 4248d17 Compare June 2, 2025 00:47
@calebdw calebdw changed the title feat: add PHP 8.5 pipe operator; reserved keywords feat: add PHP 8.5 pipe operator Jun 2, 2025
@calebdw

calebdw commented Jun 2, 2025 •

Copy link
Copy Markdown
Collaborator Author

Generally, I would recommend splitting up PRs as much as possible -- that makes them much easier to review and allows quickly merging non-controversial parts.

I normally do try to separate PRs, but Amaan has gotten on to me about having too many PRs open in the past and said I should combine them together 😅

However, I will split out the reserved keyword work

@clason

clason commented Jun 2, 2025

Copy link
Copy Markdown
Member

Amaan has gotten on to me about having too many PRs open in the past and said I should combine them together 😅

Why do you think his PRs never get finished? ;)

@calebdw

calebdw commented Jun 2, 2025

Copy link
Copy Markdown
Collaborator Author

Haha, you might have a point there...

Are you able to approve or do I need to have someone else?

@clason

clason commented Jun 2, 2025

Copy link
Copy Markdown
Member

I don't have org-wide privileges, unfortunately.

@calebdw

calebdw commented Jun 2, 2025

Copy link
Copy Markdown
Collaborator Author

@cfroystad, can you please approve when you get the chance?

@cfroystad cfroystad 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.

I had to think a bit about the AST structure here, but I think this is a good approach. Very nice work!

Just for honesty: I didn't check the bindings at all

@calebdw
calebdw merged commit e771eb9 into master Jun 2, 2025
@calebdw
calebdw deleted the calebdw/push-wqttnrqlwoql branch June 2, 2025 12:50
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