Readme: Update the recommended PHP version to 5.6.
This also includes a unit test to ensure we're only recommending actively supported versions of PHP in the future. Fixes #33758. git-svn-id: https://develop.svn.wordpress.org/trunk@33937 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
95b3edd4ce
commit
0b6454bac5
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<h2>Recommendations</h2>
|
<h2>Recommendations</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="http://php.net/">PHP</a> version <strong>5.4</strong> or higher.</li>
|
<li><a href="http://php.net/">PHP</a> version <strong>5.6</strong> or higher.</li>
|
||||||
<li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.5</strong> or higher.</li>
|
<li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.5</strong> or higher.</li>
|
||||||
<li>The <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
|
<li>The <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
|
||||||
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
|
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
|
||||||
|
@ -26,6 +26,18 @@ class Tests_Basic extends WP_UnitTestCase {
|
|||||||
preg_match( '#<br /> Version (.*)#', $readme, $matches );
|
preg_match( '#<br /> Version (.*)#', $readme, $matches );
|
||||||
list( $version ) = explode( '-', $GLOBALS['wp_version'] );
|
list( $version ) = explode( '-', $GLOBALS['wp_version'] );
|
||||||
$this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." );
|
$this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." );
|
||||||
|
|
||||||
|
preg_match( '#Recommendations.*PHP</a> version <strong>([0-9.]*)#s', $readme, $matches );
|
||||||
|
|
||||||
|
$response = wp_remote_get( 'https://secure.php.net/supported-versions.php' );
|
||||||
|
if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
|
||||||
|
$this->markTestSkipped( 'Could not contact PHP.net to check versions.' );
|
||||||
|
}
|
||||||
|
$php = wp_remote_retrieve_body( $response );
|
||||||
|
|
||||||
|
preg_match_all( '#<tr class="stable">\s*<td>\s*<a [^>]*>\s*([0-9.]*)#s', $php, $phpmatches );
|
||||||
|
|
||||||
|
$this->assertContains( $matches[1], $phpmatches[1] );
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_license() {
|
function test_license() {
|
||||||
|
Loading…
Reference in New Issue
Block a user