Skip to content

Ensure our code works on PHP 8.0 and not just 8.1+#210

Merged
dkotter merged 1 commit intodevelopfrom
fix/php8-0-issue
Jul 15, 2025
Merged

Ensure our code works on PHP 8.0 and not just 8.1+#210
dkotter merged 1 commit intodevelopfrom
fix/php8-0-issue

Conversation

@dkotter
Copy link
Copy Markdown
Collaborator

@dkotter dkotter commented Jul 15, 2025

Description of the Change

As reported on the WordPress.org forum, there is an issue in the latest release where any plugin that comes after Convert to Blocks doesn't show properly in the plugin list.

In that release, we did add code that adds a setting link to this screen (#195) and so I figured that was probably the culprit. Looking at the code for that again, noticed we had some code that only works on PHP 8.1+, so sites running PHP 8.0 (which is our minimum) will run into an error on the plugin screen. This PR fixes that

How to test the Change

  1. Install the latest version of Convert to Blocks within an environment running PHP 8.0
  2. Go to the plugin list screen and notice a PHP error will be thrown
  3. Update to PHP 8.2+ and notice the error goes away
  4. Checkout this PR and test again on PHP 8.0
  5. Notice no error is thrown

Changelog Entry

Fixed - Ensure no PHP error is thrown on the plugin list screen when running PHP 8.0

Credits

Props @dkotter, dinhac

Checklist:

@dkotter dkotter added this to the Future Release milestone Jul 15, 2025
@dkotter dkotter self-assigned this Jul 15, 2025
@dkotter dkotter requested review from faisal-alvi and removed request for dsawardekar and jeffpaul July 15, 2025 15:59
Copy link
Copy Markdown
Contributor

@faisal-alvi faisal-alvi left a comment

Choose a reason for hiding this comment

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

@dkotter Thanks for the fix. LGTM and tests well.

Before:
image

After:
image

@dkotter dkotter modified the milestones: Future Release, 1.3.4 Jul 15, 2025
@dkotter dkotter merged commit 1f74e0f into develop Jul 15, 2025
11 checks passed
@dkotter dkotter deleted the fix/php8-0-issue branch July 15, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants