Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build/Test Tools: Enable running the tests on PHP 8.4 (Trac: 62061) #7379

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.1', '8.2', '8.3' ]
tests-domain: [ 'example.org' ]
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mariadb' ]
db-version: [ '10.4', '10.6', '10.11', '11.2' ]
multisite: [ false, true ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:

# __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
- name: Run (Xdebug) tests
if: ${{ inputs.php != '8.3' }}
if: ${{ inputs.php != '8.4' }}
continue-on-error: ${{ inputs.allow-errors }}
run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0' ]
wp: [ '6.0', '6.1', '6.2', '6.3', '6.4', '6.5', '6.6' ]
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
php: [ '8.0', '8.1', '8.2', '8.3' ]
php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0' ]
wp: [ '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ]
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
php: [ '8.0', '8.1', '8.2', '8.3' ]
php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0' ]
wp: [ '4.1', '4.2', '4.3', '4.4', '4.5' ]
Expand Down
3 changes: 2 additions & 1 deletion .version-support-php.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"8.0",
"8.1",
"8.2",
"8.3"
"8.3",
"8.4"
],
"6-6": [
"7.2",
Expand Down
20 changes: 20 additions & 0 deletions tests/phpunit/tests/import/parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public function set_up() {
* @covers WXR_Parser_XML::parse
*/
public function test_malformed_wxr() {
if ( PHP_VERSION_ID >= 80400 ) {
$this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
}

$file = DIR_TESTDATA . '/export/malformed.xml';

// Regex based parser cannot detect malformed XML.
Expand All @@ -42,6 +46,10 @@ public function test_malformed_wxr() {
* @covers WXR_Parser_Regex::parse
*/
public function test_invalid_wxr() {
if ( PHP_VERSION_ID >= 80400 ) {
$this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
}

$f1 = DIR_TESTDATA . '/export/missing-version-tag.xml';
$f2 = DIR_TESTDATA . '/export/invalid-version-tag.xml';

Expand All @@ -61,6 +69,10 @@ public function test_invalid_wxr() {
* @covers WXR_Parser_Regex::parse
*/
public function test_wxr_version_1_1() {
if ( PHP_VERSION_ID >= 80400 ) {
$this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
}

$file = DIR_TESTDATA . '/export/valid-wxr-1.1.xml';

foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) {
Expand Down Expand Up @@ -159,6 +171,10 @@ public function test_wxr_version_1_1() {
* @covers WXR_Parser_Regex::parse
*/
public function test_wxr_version_1_0() {
if ( PHP_VERSION_ID >= 80400 ) {
$this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
}

$file = DIR_TESTDATA . '/export/valid-wxr-1.0.xml';

foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) {
Expand Down Expand Up @@ -257,6 +273,10 @@ public function test_wxr_version_1_0() {
* @covers WXR_Parser_Regex::parse
*/
public function test_escaped_cdata_closing_sequence() {
if ( PHP_VERSION_ID >= 80400 ) {
$this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
}

$file = DIR_TESTDATA . '/export/crazy-cdata-escaped.xml';

foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) {
Expand Down
Loading