phpro / grumphp

A PHP code-quality tool
MIT License
4.11k stars 429 forks source link

Upgrade to php-parser v5 #1124

Closed veewee closed 4 months ago

veewee commented 4 months ago
Q A
Branch master
Bug fix? no
New feature? yes
BC breaks? kinda yes, kinda no
Deprecations? yes
Documented? yes
Fixed tickets #1119
Shim https://github.com/phpro/grumphp-shim/pull/28

Upgrades php-parser to v5. New configuration:

php_version

Default: null

Can be any PHP version specified as major.minor. For example: 8.2. There is a special placeholder latest, which will use the latest supported PHP version from php-parser. If left empty, the system's PHP version will be picked. This is the default behaviour.

The old kind option got deprecated and will be removed in grumphp v3. Since the option lets you select PHP5 or 7, I don't think this will actually be a BC break in grumphp 2 (which requires at least PHP 8.1 anyways). In case it was set, it will be ignored and the system's default PHP version will be selected.

I won't be tagging a new major for this, because I believe the changes are very subtle: for most people they won't be an issue and overcomeable for people with very high customizations.