phpcompat icon indicating copy to clipboard operation
phpcompat copied to clipboard

PHP Compat Revamp

Open dkotter opened this issue 3 years ago • 0 comments

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.

dkotter avatar Jul 25 '22 21:07 dkotter