Skip to content

Run PHPStan against PHP 7.1+#114

Merged
n7studios merged 1 commit intomainfrom
lint-code-php7.1
Apr 13, 2026
Merged

Run PHPStan against PHP 7.1+#114
n7studios merged 1 commit intomainfrom
lint-code-php7.1

Conversation

@n7studios
Copy link
Copy Markdown
Contributor

Summary

1.3.9 and 1.3.9.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.4.0 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 requested review from a team, ciccio-kit and noelherrick and removed request for a team April 10, 2026 03:04
@n7studios n7studios marked this pull request as ready for review April 10, 2026 03:04
Copy link
Copy Markdown

@ciccio-kit ciccio-kit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@n7studios n7studios merged commit 6d07a2e into main Apr 13, 2026
52 of 56 checks passed
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.

2 participants