Open joyously opened 6 years ago
@joyously How do you mean ? For the installing/activating, TGMPA defers to the WP core code to handle that, so if core won't install/activate a plugin because of a PHP requirement, TGMPA won't either.
Or do you mean the user interface of TGMPA ?
Yeah, I didn't read all the code, so I didn't know if TGMPA was doing the actual install or not. But if not, there is still the message to display. The tickets I mention are just doing user interface, not preventing installation. I still think the block should be at activation, not installation, but nobody else seems to agree.
Ok, I understand and yes, we would certainly accept a patch for that.
I still think the block should be at activation, not installation, but nobody else seems to agree.
Not nobody ;-) I think the block should be on both, i.e. prevent people installing a plugin they won't be able to activate and also - if people have uploaded a plugin via FTP or something - prevent it from being activated if it wouldn't work anyway.
prevent people installing a plugin they won't be able to activate
That's the part nobody seems to agree with me on. If you are preparing to upgrade PHP, you would want to install plugins ahead of the upgrade so there is less down time. And the way they are showing the compatibility warnings, after the upgrade you won't be able to distinguish which plugins are incompatible. It needs the range of versions from Tide, instead of just the minimum PHP version from the plugin header. So it makes more sense to only block activation, not installation (or update).
@joyously I think some serious discussion should be had about blocking updates too as a plugin may change the required PHP version at some point during its lifetime and upgrading the plugin when not on the right PHP may bring the whole website down.
Yes, there is a ticket for it. In my mind, it would behave differently it it's activated or not. I think it's OK to update if it's not activated, because it's the same scenario as installing before a PHP upgrade (get the latest update before upgrade). If it's activated, then it's a case of "Do you go through the manual steps of deactivate, update, activate?", because that brings you back to catching it on activation. So, a warning ahead of time is good, but let the user decide what to do.
Has this been updated to check the new plugin header field for
Requires PHP
? See Trac tickets: https://core.trac.wordpress.org/ticket/43986 https://core.trac.wordpress.org/ticket/43987 https://core.trac.wordpress.org/ticket/44350