Require wordpress/core-implementation
and php
as defined by the plugin
#516
Labels
wordpress/core-implementation
and php
as defined by the plugin
#516
Hello,
I've long noticed a potential area for improvement concerning compatibility checks with PHP versions and specific WordPress core versions. Currently, developers need to manually ensure that their WordPress environment matches the requirements of the plugins and themes they incorporate.
Example
Let's assume my project has this composer.json:
As of writing, this will install WordPress core in version
5.4.15
and Query Monitor in version3.15.0
. However, the installed Query Monitor version requires at least WordPress 5.6 and PHP 7.4, neither of which are satisfied in the current project configuration.This is the header for the installed QM version:
Suggestion
Requires at least
field provided by the WordPress.org Plugin/Theme API for the WordPress version andRequires PHP
for the PHP version.wordpress/core-implementation
for WordPress core (https://packagist.org/providers/wordpress/core-implementation)Potential Breaking Change
While this proposal aims to improve compatibility checks, it's crucial to consider the potential for breaking changes in websites that currently do not install a WordPress core package that provides
wordpress/core-implementation
.I haven't looked into https://github.com/WordPress/wp-plugin-dependencies deeply, but I assume it's something that could/should be considered down the line.
The text was updated successfully, but these errors were encountered: