joomla/joomla-cms — pull request #2802 by mbabker (2014-01-16 22:04:38+00:00)
Title: Add support for checking minimum PHP version in XML update stream

The CMS lacks a mechanism for checking PHP version support on updates. This allows extensions to erroneously present updates to users who are in unsupported server environments, such as the case with 2.5 to 3.x updates presently.

This patch introduces a `` tag which should indicate the minimum supported PHP version of an extension. This is demonstrated with a sample update stream at https://github.com/mbabker/phpmindemo/blob/master/updates.xml#L49-L64.

To test this patch, please install the sample plugin from https://github.com/mbabker/phpmindemo/releases/download/1.0.0/plg_system_phpmindemo_1.0.0.zip. Once installed, go to the Extension Manager's Update view and search for updates. Depending on your system, you'll see one of the following versions:

- 1.1.1 - No `` defined, available to all users
- 5.4.0 - `` defined as PHP 5.4, PHP 5.3 users should not see this update
- 5.5.0 - `` defined as PHP 5.5, PHP 5.4 and 5.3 users should not see this update