Skip to content
Merged
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
20 changes: 10 additions & 10 deletions features/package.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Install WP-CLI packages

Scenario: Install a package requiring a WP-CLI version that doesn't match
Given an empty directory
And a new Phar with version "2.8.0"
And a new Phar with version "2.10.0"
And a path-command/command.php file:
"""
<?php
Expand All @@ -25,7 +25,7 @@ Feature: Install WP-CLI packages
"files": [ "command.php" ]
},
"require": {
"wp-cli/wp-cli": ">=2.9.0"
"wp-cli/wp-cli": ">=2.11.0"
},
"require-dev": {
"behat/behat": "~2.5"
Expand All @@ -44,7 +44,7 @@ Feature: Install WP-CLI packages
"""
And STDOUT should contain:
"""
wp-cli/wp-cli >=2.9.0 -> satisfiable by
wp-cli/wp-cli >=2.11.0 -> satisfiable by
"""
And STDERR should contain:
"""
Expand All @@ -55,12 +55,12 @@ Feature: Install WP-CLI packages
When I run `cat {PACKAGE_PATH}composer.json`
Then STDOUT should contain:
"""
"version": "2.8.0",
"version": "2.10.0",
"""

Scenario: Install a package requiring a WP-CLI version that does match
Given an empty directory
And a new Phar with version "2.8.0"
And a new Phar with version "2.11.0"
And a path-command/command.php file:
"""
<?php
Expand All @@ -79,7 +79,7 @@ Feature: Install WP-CLI packages
"files": [ "command.php" ]
},
"require": {
"wp-cli/wp-cli": ">=2.7.0"
"wp-cli/wp-cli": ">=2.10.0"
},
"require-dev": {
"behat/behat": "~2.5"
Expand All @@ -98,12 +98,12 @@ Feature: Install WP-CLI packages
When I run `cat {PACKAGE_PATH}composer.json`
Then STDOUT should contain:
"""
"version": "2.8.0",
"version": "2.11.0",
"""

Scenario: Install a package requiring a WP-CLI alpha version that does match
Given an empty directory
And a new Phar with version "2.8.0-alpha-90ecad6"
And a new Phar with version "2.12.0-alpha-90ecad6"
And a path-command/command.php file:
"""
<?php
Expand All @@ -122,7 +122,7 @@ Feature: Install WP-CLI packages
"files": [ "command.php" ]
},
"require": {
"wp-cli/wp-cli": ">=2.7.0"
"wp-cli/wp-cli": ">=2.11.0"
},
"require-dev": {
"behat/behat": "~2.5"
Expand All @@ -141,5 +141,5 @@ Feature: Install WP-CLI packages
When I run `cat {PACKAGE_PATH}composer.json`
Then STDOUT should contain:
"""
"version": "2.8.0-alpha",
"version": "2.12.0-alpha",
"""
5 changes: 5 additions & 0 deletions utils/make-phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ function get_composer_versions( $current_version ) {
->exclude( 'composer/composer/src/Composer/Question' )
->exclude( 'composer/composer/src/Composer/Repository/Pear' )
->exclude( 'composer/composer/src/Composer/SelfUpdate' );

// required by justinrainbow/json-schema v6+.
if ( is_dir( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' ) ) {
$finder->in( WP_CLI_VENDOR_DIR . '/marc-mabe/php-enum' );
}
}

foreach ( $finder as $file ) {
Expand Down
Loading