Skip to content

Run PHPStan against PHP 7.1+#1067

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

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

Conversation

@n7studios
Copy link
Copy Markdown
Contributor

@n7studios n7studios commented Apr 9, 2026

Summary

3.2.2 and 3.2.2.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)

3.2.3 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 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team April 9, 2026 05:48
@n7studios n7studios marked this pull request as ready for review April 9, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant