pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
297 stars 442 forks source link

Checking the version of a plugin before loading it #7531

Open marcbria opened 2 years ago

marcbria commented 2 years ago

Describe the problem you would like to solve A common problem during upgrade is that a plugin isn't compatible with the new version. This can lead to functionality being broken or, in the worst cases, the entire site can break.

Describe the solution you'd like Before upgrading, the software should check whether each plugin is compatible with the version being upgraded to. If the plugin is compatible, or a compatible version exists in the plugin gallery, it should download the new version and upgrade.

If no compatible version exists or can be found, the upgrade process should stop and the admin should be asked to disable the plugin before upgrading.

Who is asking for this feature? System administrators

Additional information We have discussed two approaches to determining compatibility in Slack:

WordPress has a feature when activating a plugin that loads the plugin, checks for a fatal exception/error, and if one is found automatically disables the plugin and displays a warning.

See Drupal's compatibility metadata: https://www.drupal.org/docs/creating-custom-modules/let-drupal-know-about-your-module-with-an-infoyml-file

marcbria commented 2 years ago

@asmecher, @ctgraham, @NateWr, @henriqueramos, @jonasraoni and @Vitaliy-1 we can keep talking about this here.