File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ function wp_cli( cmd ) {
5757function install_wp_importer ( ) {
5858 const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer' ;
5959
60+
61+ // The final version of the WordPress Importer plugin with support for PHP < 7.2 is 0.9.0.
62+ const phpVersion = parseFloat ( process . env . LOCAL_PHP . split ( '-' ) [ 0 ] ) ;
63+ const branchFlag = phpVersion < 7.2 ? '--branch 0.9.0' : '' ;
64+
6065 execSync ( `docker compose exec -T php rm -rf ${ testPluginDirectory } ` , { stdio : 'inherit' } ) ;
61- execSync ( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${ testPluginDirectory } --depth=1` , { stdio : 'inherit' } ) ;
66+ execSync ( `docker compose exec -T php git clone ${ branchFlag } https://github.com/WordPress/wordpress-importer.git ${ testPluginDirectory } --depth=1` , { stdio : 'inherit' } ) ;
6267}
You can’t perform that action at this time.
0 commit comments