Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Compat Revamp #307

Merged

Conversation

dkotter
Copy link
Contributor

@dkotter dkotter commented Jul 25, 2022

Description of the Change

This PR introduces a revamp of the PHP Compat plugin, changing up how scans are done to utilize the WP Tide service instead of running scans locally. This builds off of the existing work done in the feat/phpcompat-revamp branch.

This is a major refactor that not only changes how the scanning behavior works but also refactors a lot of the existing code and structure (and also removes things that are no longer needed).

The way this now works is you go to the PHP Compatibility page and choose between either scanning your active plugins and active theme or scan all plugins and themes. You no longer choose which PHP version to scan against as the results returned will contain PHP 5.6+.

Once a scan is started, it will make individual requests to the WP Tide service with the name and version of the plugin or theme being scanned. If no results are immediately found, the request will be re-tried every 5 seconds until we get a success response. If results haven't been cached on the WP Tide side, larger plugins can sometimes take a few minutes to return results, though typically things return quickly.

We then render the results very similarly to how they currently show, showing if things are good or if there were issues. If compatibility issues are found, those issues can be viewed by clicking on the appropriate PHP version. Results can also be exported to a file.

Screenshots

Screen Shot 2022-07-25 at 3 32 34 PM

Screen Shot 2022-07-25 at 3 33 14 PM

Screen Shot 2022-07-25 at 3 33 01 PM

Screen Shot 2022-07-25 at 3 34 56 PM

Screen Shot 2022-07-25 at 3 36 24 PM

Verification Process

Thorough testing should be done to ensure things still function as expected. Once the plugin is installed and active, you can go to Tools > PHP Compatibility.

From here, you can run a scan against all active plugins and the active theme or run a scan against all plugins and themes.

Trigger a scan and ensure results are shown. Ensure you can export the results and view the raw results.

Copy link
Member

@anthonyburchell anthonyburchell left a comment

Choose a reason for hiding this comment

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

Incredible work @dkotter and @jeffpaul . Thank you and your teams for the quality work here. I am working now to prepare the release and we will likely ship it in the next week or two!

@anthonyburchell anthonyburchell merged commit 994e15a into wpengine:feat/phpcompat-revamp Sep 7, 2022
@jeffpaul
Copy link
Collaborator

jeffpaul commented Sep 9, 2022

@cadic props to all your work here, thank you!

@nicomollet
Copy link

@anthonyburchell any news about a release on wp.org ?
Thanks

@agenceKanvas
Copy link

Curious to know too !

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