Skip to content

Commit 03f3a41

Browse files
authored
Merge pull request #743 from wp-cli/fix/update-versions-in-tests
Fix broken phar tests
2 parents 42a5803 + e08f092 commit 03f3a41

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

features/package.feature

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: Install WP-CLI packages
66

77
Scenario: Install a package requiring a WP-CLI version that doesn't match
88
Given an empty directory
9-
And a new Phar with version "2.8.0"
9+
And a new Phar with version "2.10.0"
1010
And a path-command/command.php file:
1111
"""
1212
<?php
@@ -25,7 +25,7 @@ Feature: Install WP-CLI packages
2525
"files": [ "command.php" ]
2626
},
2727
"require": {
28-
"wp-cli/wp-cli": ">=2.9.0"
28+
"wp-cli/wp-cli": ">=2.11.0"
2929
},
3030
"require-dev": {
3131
"behat/behat": "~2.5"
@@ -44,7 +44,7 @@ Feature: Install WP-CLI packages
4444
"""
4545
And STDOUT should contain:
4646
"""
47-
wp-cli/wp-cli >=2.9.0 -> satisfiable by
47+
wp-cli/wp-cli >=2.11.0 -> satisfiable by
4848
"""
4949
And STDERR should contain:
5050
"""
@@ -55,12 +55,12 @@ Feature: Install WP-CLI packages
5555
When I run `cat {PACKAGE_PATH}composer.json`
5656
Then STDOUT should contain:
5757
"""
58-
"version": "2.8.0",
58+
"version": "2.10.0",
5959
"""
6060

6161
Scenario: Install a package requiring a WP-CLI version that does match
6262
Given an empty directory
63-
And a new Phar with version "2.8.0"
63+
And a new Phar with version "2.11.0"
6464
And a path-command/command.php file:
6565
"""
6666
<?php
@@ -79,7 +79,7 @@ Feature: Install WP-CLI packages
7979
"files": [ "command.php" ]
8080
},
8181
"require": {
82-
"wp-cli/wp-cli": ">=2.7.0"
82+
"wp-cli/wp-cli": ">=2.10.0"
8383
},
8484
"require-dev": {
8585
"behat/behat": "~2.5"
@@ -98,12 +98,12 @@ Feature: Install WP-CLI packages
9898
When I run `cat {PACKAGE_PATH}composer.json`
9999
Then STDOUT should contain:
100100
"""
101-
"version": "2.8.0",
101+
"version": "2.11.0",
102102
"""
103103

104104
Scenario: Install a package requiring a WP-CLI alpha version that does match
105105
Given an empty directory
106-
And a new Phar with version "2.8.0-alpha-90ecad6"
106+
And a new Phar with version "2.12.0-alpha-90ecad6"
107107
And a path-command/command.php file:
108108
"""
109109
<?php
@@ -122,7 +122,7 @@ Feature: Install WP-CLI packages
122122
"files": [ "command.php" ]
123123
},
124124
"require": {
125-
"wp-cli/wp-cli": ">=2.7.0"
125+
"wp-cli/wp-cli": ">=2.11.0"
126126
},
127127
"require-dev": {
128128
"behat/behat": "~2.5"
@@ -141,5 +141,5 @@ Feature: Install WP-CLI packages
141141
When I run `cat {PACKAGE_PATH}composer.json`
142142
Then STDOUT should contain:
143143
"""
144-
"version": "2.8.0-alpha",
144+
"version": "2.12.0-alpha",
145145
"""

utils/make-phar.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ function get_composer_versions( $current_version ) {
243243
->exclude( 'composer/composer/src/Composer/Question' )
244244
->exclude( 'composer/composer/src/Composer/Repository/Pear' )
245245
->exclude( 'composer/composer/src/Composer/SelfUpdate' );
246+
247+
// required by justinrainbow/json-schema v6+.
248+
if ( is_dir( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' ) ) {
249+
$finder->in( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' );
250+
}
246251
}
247252

248253
foreach ( $finder as $file ) {

0 commit comments

Comments
 (0)