Skip to content

Syntax highlighting does not support PHP 8.4 property hooks #86

Open

Description

@Roardom

PHP 8.4 property hooks don't seem to be highlighted correctly (Note the weirdly highlighted ->where).

With property hooks With function
Image Image

Activity

  1. Roardom commented on Dec 15, 2025

    @Roardom
    ContributorAuthor

    This is fixed by updating the php grammar from v22.1 here:

    commit = "8ab93274065cbaf529ea15c24360cfa3348ec9e4"

    Unfortunately, the phpdoc grammar breaks if the php grammer is updated to v23.0 or beyond: claytonrcarter/tree-sitter-phpdoc#43

  2. claytonrcarter commented on Dec 16, 2025

    @claytonrcarter
    Contributor

    Unfortunately, the phpdoc grammar breaks if the php grammer is updated to v23.0 or beyond: claytonrcarter/tree-sitter-phpdoc#43

    I just merged Caleb's fix, so this should be good to go. If you need any other updates to get this working in Zed, please let me know.

  3. Roardom commented on Dec 16, 2025

    @Roardom
    ContributorAuthor

    Thanks @claytonrcarter (and @calebdw!)

    I ended up spending the morning learning tree-sitter and managed to get php and phpdoc updated to the latest versions without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions