qossmic / deptrac

Keep your architecture clean.
https://qossmic.github.io/deptrac
MIT License
2.61k stars 135 forks source link

Error message when using anonymous readonly class in php 8.3 #1320

Closed johanv closed 8 months ago

johanv commented 9 months ago

Hi,

I use deptrac to guard the code dependencies in my projects. Thank you for creating this tool; I find it very useful!

Yesterday I started using php 8.3, and so I discovered that deptrac shows an error message when I use anonymous readonly classes:

Syntax error, unexpected T_READONLY on line 84

I think this will be fixed if we can use nicik/php-parser v5 (which is not released yet, so I guess we'll have to wait).

But I thought it would be a good idea to create this issue already. (Which is not a very big problem, because the error message doesn't seem to make the job fail.)

Thanks again for the good work!

gennadigennadigennadi commented 9 months ago

Is there a issue or a merged PR for Php-parser? I just had a quick look and couldn't find anything.

johanv commented 9 months ago

The changelog for v5.0.0 alpha 3 mentions:

[PHP 8.3] Added support for readonly anonymous classes.

https://github.com/nikic/PHP-Parser/blob/master/CHANGELOG.md#version-500-alpha3-2023-06-24

gennadigennadigennadi commented 8 months ago

https://github.com/nikic/PHP-Parser/releases/tag/v4.17.0 also added the php8.3 compatibility. We just updated php-parser to 4.18, there fore I will close this issue.