Repository navigation
chore: replace microsoft/tolerant-php-parser with native PhpToken - #883
Conversation
There was a problem hiding this comment.
My questions are more high-level:
1. Looking at the microsoft/tolerant-php-parser library itself, are we sure it's unmaintained? Looking at the recent releases, it seems to be actively maintained.
2. Are we sure we want to migrate from a library to a bespoke implementation that we have to maintain long-term? This part of the generator is doing heavy lifting so this is more of a directional question.
Looking deeper into how the processor is actually used, the relative scope is very small so we don't need to really overdo the migration. Also, I see that indeed the library is unmaintained so LGTM.
| T_FINAL, | ||
| T_ABSTRACT, | ||
| T_DOC_COMMENT, | ||
| T_COMMENT, |
There was a problem hiding this comment.
Are we missing any types here? Just double-checking
There was a problem hiding this comment.
Good catch — added PHP 8 attribute support here and a test case for it.
Replaces the unmaintained microsoft/tolerant-php-parser dependency in
FragmentInjectionProcessorwith PHP's built-inPhpToken::tokenize().