Skip to content

Conversation

@Chrico
Copy link
Member

@Chrico Chrico commented May 9, 2025

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR will remove the restriction of PHP <8.4 to support PHP 8.4.

Right now, the static analysis for PHP 7.4 is failing. No code was changed, so it seems like the error is happening in a different location. I've also tested PHPStan 2.1.7, which worked before (2 months ago) but now also fails. Same as the latest version 2.1.14. The only thing that has changed in between is the WordPress version (using latest.php from inpsyde/wp-stubs).

I've decided to move the PHP 8.4 to a separate step for PHP Unit Testing. The "dependency-versions" with "lowest" will not work with PHP 8.4 due to missing support (Mockery, Patchwork, ...).

@Chrico Chrico requested review from gmazzap and tfrommen May 9, 2025 09:29
@codecov
Copy link

codecov bot commented May 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.08%. Comparing base (83d7468) to head (93695b7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #62   +/-   ##
=========================================
  Coverage     98.08%   98.08%           
  Complexity      253      253           
=========================================
  Files            10       10           
  Lines           627      627           
=========================================
  Hits            615      615           
  Misses           12       12           
Flag Coverage Δ
unittests 98.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…instead of "latest".

This change is needed because with WP 6.8 (latest in May 2025), the static analysis fail due invalid code in PHP 7.4.

See also: php-stubs/wordpress-stubs#277
Copy link
Member

@tfrommen tfrommen left a comment

Choose a reason for hiding this comment

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

Are we tracking anywhere that we need/want to revert to latest as soon as possible?

Otherwise, this is looking good. 👍

@Chrico
Copy link
Member Author

Chrico commented May 9, 2025

Just internal. I'll set myself a reminder to check regarding the releases, but I've also left a note in the commit so that we know why it is 6.7 fixed. 💪🏻

@Chrico Chrico merged commit e1ca1c8 into master May 9, 2025
70 checks passed
@Chrico Chrico deleted the feature/php-84 branch May 9, 2025 12:13
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