Skip to content

Conversation

@AlexP11223
Copy link
Collaborator

@AlexP11223 AlexP11223 commented Feb 6, 2026

Replaced Psalm with PHPstan.

This PR includes many PHPStan error fixes, but most of them are quite simple, such as adding missing type checks, updating phpDocs, or skipping errors when makes sense (e.g. was skipped before with Psalm). I think many of them are in the old code (before Psalm baseline) that was not touched often, so hopefully it will not result in many merge conflicts.

Notable changes:

  • Removed return after wp_send_* (it calls die/wp_die)
  • Replaced is_a with instanceof (is_a is supposed to accept only objects)
  • Added missing ( ) for ??, like 'value: ' . $a[123] ?? 'none'

For reviewing, it's probably easier to go commit by commit, since they are somewhat grouped by fix type.

PHPStan level is set to 8, and generated baseline, which mainly consists of things like missing array type phpDoc, missing return types.

The inpsyde/wp-stubs package requires PHP 8 to avoid parsing error, so I updated the default version in DDEV.

The GHA workflow was updated in #4070

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

🔗 Test this pull request with WordPress Playground

What's included:

  • ✅ WordPress (latest)
  • ✅ WooCommerce (latest)
  • ✅ PayPal Payments plugin v3.4.0-pr4069-21950312850-g0672f29 (built from this PR)

Login credentials:

  • Username: admin
  • Password: password

Plugin Details:

  • Version: 3.4.0-pr4069-21950312850-g0672f29
  • Commit: 0672f29
  • Artifact: woocommerce-paypal-payments-3.4.0-pr4069-21950312850-g0672f29

💡 The demo environment resets each time you refresh. Perfect for testing!

🔄 This link updates automatically with each new commit to the PR.

⚠️ This URL is valid for 30 days from when this comment was last updated.


🤖 Auto-generated for commit 0672f29 • Last updated: 2026-02-12T14:24:02.087Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants