Skip to content

Run PHPStan against PHP 7.1+#135

Open
n7studios wants to merge 1 commit intomainfrom
lint-code-php7.1
Open

Run PHPStan against PHP 7.1+#135
n7studios wants to merge 1 commit intomainfrom
lint-code-php7.1

Conversation

@n7studios
Copy link
Copy Markdown
Contributor

Summary

1.9.0 and 1.9.0.1 shipped with Kit WordPress Libraries 2.1.4, which introduced a parse error on PHP ≤7.4 due to union types (PHP 8+ only) in the SDK:

syntax error, unexpected '|', expecting variable (T_VARIABLE)

1.9.1 was released, restoring the Kit WordPress Libraries back to 2.1.3. PHP 7.1+ compatibility was then restored in the Kit WordPress Libraries 2.1.5 via a backport.

This PR sets PHPStan’s phpVersion to ensure analysis targets PHP 7.1+ for the Plugin's code, to protect against a similar issue stemming from outside the Kit WordPress Libraries in the future.

While dropping older PHP support would be ideal, current usage indicates it’s not yet practical.

Testing

Existing tests pass.

Checklist

@n7studios n7studios self-assigned this Apr 10, 2026
@n7studios n7studios added the enhancement New feature or request label Apr 10, 2026
@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team April 10, 2026 12:01
@n7studios n7studios marked this pull request as ready for review April 10, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants