Make WordPress Core

Changeset 60750 for branches/6.4


Ignore:
Timestamp:
09/15/2025 08:08:40 PM (3 months ago)
Author:
desrosj
Message:

Build/Test Tools: Pin Importer plugin version for PHP < 7.2.

The WordPress Importer plugin now requires PHP 7.2 or higher. The plugin’s unit tests were removed as of [59769] in favor of running only within the plugin’s repository on GitHub instead.

[59769] was made during the 6.8 release cycle, so all WP <= 6.7 branches still checkout the latest revision for the plugin before running the PHPUnit test suite.

This change modifies the env:install script to download version 0.9.0 of the plugin (which is the last version of the Importer plugin that supports PHP < 7.2) when a qualifying version is being tested.

Merges [60748] to the 6.4 branch.

Props @swissspidy.
See #63983.

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/tools/local-env/scripts/install.js

    r60749 r60750  
    5656    const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer';
    5757
     58
     59    // The final version of the WordPress Importer plugin with support for PHP < 7.2 is 0.9.0.
     60    const phpVersion = parseFloat(process.env.LOCAL_PHP.split('-')[0]);
     61    const branchFlag = phpVersion < 7.2 ? '--branch 0.9.0' : '';
     62
    5863    execSync( `docker compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );
    59     execSync( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );
     64    execSync( `docker compose exec -T php git clone ${branchFlag} https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );
    6065}
Note: See TracChangeset for help on using the changeset viewer.