Changeset 60329
- Timestamp:
- 06/19/2025 11:59:01 PM (9 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/readme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/readme.php
r60313 r60329 68 68 $this->skipOnAutomatedBranches(); 69 69 70 $this->markTestSkipped(71 'Temporarily disabled. MariaDB has changed the layout and verbiage of their release documentation pages.'72 );73 74 70 $readme = file_get_contents( ABSPATH . 'readme.html' ); 75 71 76 72 preg_match( '#Recommendations.*MariaDB</a> version <strong>([0-9.]*)#s', $readme, $matches ); 77 $matches[1] = str_replace( '.', '', $matches[1] );78 73 79 $response_body = $this->get_response_body( "https://mariadb.com/kb/en/release-notes-mariadb-{$matches[1]}-series/" ); 74 $response_body = $this->get_response_body( 'https://downloads.mariadb.org/rest-api/mariadb/' ); 75 $releases = json_decode( $response_body, true ); 80 76 81 // Retrieve the date of the first stable release for the recommended branch. 82 preg_match( '#.*Stable.*?(\d{2} [A-Za-z]{3} \d{4})#s', $response_body, $mariadb_matches ); 77 foreach ( $releases['major_releases'] as $release ) { 78 if ( isset( $release['release_id'] ) && $release['release_id'] === $matches[1] ) { 79 $mariadb_eol = $release['release_eol_date']; 80 } 81 } 83 82 84 // Per https://mariadb.org/about/#maintenance-policy, MariaDB releases are supported for 5 years. 85 $mariadb_eol = gmdate( 'Y-m-d', strtotime( $mariadb_matches[1] . ' +5 years' ) ); 83 // If the release ID is not found the version is unsupported. 84 if ( ! isset( $mariadb_eol ) ) { 85 $this->fail( "{$matches[1]} is not included in MariaDB's list of supported versions. Remember to update the WordPress.org Requirements page, too." ); 86 } 87 86 88 $current_date = gmdate( 'Y-m-d' ); 87 89
Note: See TracChangeset
for help on using the changeset viewer.