Thanks Yuan.
I also tested the patch with the previous version of Grammar (v0.22.5) and found no problems. Did you experience any problems?
Since php-ts-mode is not available in emacs-29 and emacs-30 has not been released, perhaps it is better to support grammars from the release date. Or is it better to support from the date of the first merge?  I have no idea which is the best policy.
Thanks.
Vincenzo

Il giorno lun 26 ago 2024 alle ore 09:52 Yuan Fu <casouri@gmail.com> ha scritto:


> On Aug 24, 2024, at 2:41 PM, Vincenzo Pupillo <v.pupillo@gmail.com> wrote:
>
> Hi,
> This patch improves font locking, particularly for constants and some
> operators. It also extends compatibility to the latest version of the PHP
> parser.
> The patch can also be applied to version 31.0.50 .
>
> Thanks
> Vincenzo
Thanks Vince! I merged your patch to emacs-30. BTW, in the future it’s probably better to make the code work for both old and new grammar versions (whenever you can), that way people who installed the old grammar from who-knows-where can still use the mode. (I’m working on some tool to make it simpler to define alternative font-lock rules that works on multiple grammar versions.)

Yuan