From ff56557c11eaa39dedee2fcb52d7af06eae401fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 10:44:52 +0000 Subject: [PATCH 1/5] Initial plan From f332933209504e22b73d2436c2cc730ce02fabbb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:06:45 +0000 Subject: [PATCH 2/5] Restore 'Install a package with a dependency' test - Remove @broken tag from the test scenario - Update @require-php-5.6 to @require-php-7.2 (matches halaxa/json-machine requirement) - Replace yoast/wp-cli-faker (unavailable) with 10up/wpcli-vulnerability-scanner - Update assertions to use new package and dependency names (halaxa/json-machine) Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/package-install.feature | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/features/package-install.feature b/features/package-install.feature index efef40b5..78f8a539 100644 --- a/features/package-install.feature +++ b/features/package-install.feature @@ -114,42 +114,42 @@ Feature: Install WP-CLI packages Version C. """ - @require-php-5.6 @broken + @require-php-7.2 Scenario: Install a package with a dependency Given an empty directory - When I run `wp package install yoast/wp-cli-faker` + When I run `wp package install 10up/wpcli-vulnerability-scanner` Then STDOUT should contain: """ Success: Package installed """ - And the {PACKAGE_PATH}/vendor/yoast directory should contain: + And the {PACKAGE_PATH}/vendor/10up directory should contain: """ - wp-cli-faker + wpcli-vulnerability-scanner """ - And the {PACKAGE_PATH}/vendor/fzaninotto directory should contain: + And the {PACKAGE_PATH}/vendor/halaxa directory should contain: """ - faker + json-machine """ - When I run `wp package is-installed yoast/wp-cli-faker` + When I run `wp package is-installed 10up/wpcli-vulnerability-scanner` Then the return code should be 0 And STDERR should be empty And STDOUT should be empty When I run `wp package list --fields=name` Then STDOUT should be a table containing rows: - | name | - | yoast/wp-cli-faker | + | name | + | 10up/wpcli-vulnerability-scanner | And STDOUT should not contain: """ - fzaninotto/faker + halaxa/json-machine """ - When I run `wp package uninstall yoast/wp-cli-faker` + When I run `wp package uninstall 10up/wpcli-vulnerability-scanner` Then STDOUT should contain: """ - Removing require statement for package 'yoast/wp-cli-faker' from + Removing require statement for package '10up/wpcli-vulnerability-scanner' from """ And STDOUT should contain: """ @@ -157,24 +157,18 @@ Feature: Install WP-CLI packages """ And the {PACKAGE_PATH}/vendor directory should not contain: """ - yoast + 10up """ And the {PACKAGE_PATH}/vendor directory should not contain: """ - fzaninotto + halaxa """ - When I try `wp package is-installed yoast/wp-cli-faker` + When I try `wp package is-installed 10up/wpcli-vulnerability-scanner` Then the return code should be 1 And STDERR should be empty And STDOUT should be empty - When I run `wp package list` - Then STDOUT should not contain: - """ - trendwerk/faker - """ - @github-api Scenario: Install a package from a Git URL Given an empty directory From defbcdada4d2c5685a352e97134504b413e78c8e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:18:26 +0000 Subject: [PATCH 3/5] Use wp-cli-test/updateable-package for the dependency test Replace 10up/wpcli-vulnerability-scanner (deprecated) with wp-cli-test/updateable-package as suggested in code review. The package requires wp-cli/wp-cli as its dependency, which appears in vendor but not in wp package list. Remove @require-php-7.2 tag since updateable-package has no PHP version restriction. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/package-install.feature | 33 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/features/package-install.feature b/features/package-install.feature index 78f8a539..e18afbe5 100644 --- a/features/package-install.feature +++ b/features/package-install.feature @@ -114,42 +114,41 @@ Feature: Install WP-CLI packages Version C. """ - @require-php-7.2 Scenario: Install a package with a dependency Given an empty directory - When I run `wp package install 10up/wpcli-vulnerability-scanner` + When I run `wp package install wp-cli-test/updateable-package` Then STDOUT should contain: """ - Success: Package installed + Success: Package installed. """ - And the {PACKAGE_PATH}/vendor/10up directory should contain: + And the {PACKAGE_PATH}/vendor/wp-cli-test directory should contain: """ - wpcli-vulnerability-scanner + updateable-package """ - And the {PACKAGE_PATH}/vendor/halaxa directory should contain: + And the {PACKAGE_PATH}/vendor/wp-cli directory should contain: """ - json-machine + wp-cli """ - When I run `wp package is-installed 10up/wpcli-vulnerability-scanner` + When I run `wp package is-installed wp-cli-test/updateable-package` Then the return code should be 0 And STDERR should be empty And STDOUT should be empty When I run `wp package list --fields=name` Then STDOUT should be a table containing rows: - | name | - | 10up/wpcli-vulnerability-scanner | + | name | + | wp-cli-test/updateable-package | And STDOUT should not contain: """ - halaxa/json-machine + wp-cli/wp-cli """ - When I run `wp package uninstall 10up/wpcli-vulnerability-scanner` + When I run `wp package uninstall wp-cli-test/updateable-package` Then STDOUT should contain: """ - Removing require statement for package '10up/wpcli-vulnerability-scanner' from + Removing require statement for package 'wp-cli-test/updateable-package' from """ And STDOUT should contain: """ @@ -157,14 +156,10 @@ Feature: Install WP-CLI packages """ And the {PACKAGE_PATH}/vendor directory should not contain: """ - 10up - """ - And the {PACKAGE_PATH}/vendor directory should not contain: - """ - halaxa + wp-cli-test """ - When I try `wp package is-installed 10up/wpcli-vulnerability-scanner` + When I try `wp package is-installed wp-cli-test/updateable-package` Then the return code should be 1 And STDERR should be empty And STDOUT should be empty From 1eed1607e09cb00e1bde7337762598d37c3ea826 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 3 Mar 2026 14:41:14 +0100 Subject: [PATCH 4/5] Fix test --- features/package-install.feature | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/features/package-install.feature b/features/package-install.feature index ea0010ca..c28df893 100644 --- a/features/package-install.feature +++ b/features/package-install.feature @@ -114,35 +114,37 @@ Feature: Install WP-CLI packages Version C. """ + # The package requires PHP 7.4 + @require-php-7.4 Scenario: Install a package with a dependency Given an empty directory - When I run `wp package install wp-cli-test/updateable-package` + When I run `wp package install https://github.com/swissspidy/validate-readme-command.git` Then STDOUT should contain: """ Success: Package installed. """ - And the {PACKAGE_PATH}/vendor/wp-cli-test directory should contain: + And the {PACKAGE_PATH}/vendor/swissspidy directory should contain: """ - updateable-package + validate-readme-command """ - And the {PACKAGE_PATH}/vendor/wp-cli directory should contain: + And the {PACKAGE_PATH}/vendor/michelf directory should contain: """ - wp-cli + php-markdown """ - When I run `wp package is-installed wp-cli-test/updateable-package` + When I run `wp package is-installed swissspidy/validate-readme-command` Then the return code should be 0 And STDERR should be empty And STDOUT should be empty When I run `wp package list --fields=name` Then STDOUT should be a table containing rows: - | name | - | wp-cli-test/updateable-package | + | name | + | swissspidy/validate-readme-command | And STDOUT should not contain: """ - wp-cli/wp-cli + michelf """ When I run `wp package uninstall wp-cli-test/updateable-package` From 43ba5f846d839fb6dd056caffb7c2a9b07202683 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 3 Mar 2026 15:56:05 +0100 Subject: [PATCH 5/5] Fix test --- features/package-install.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/package-install.feature b/features/package-install.feature index 4c49ba4e..bd77b2b4 100644 --- a/features/package-install.feature +++ b/features/package-install.feature @@ -147,10 +147,10 @@ Feature: Install WP-CLI packages michelf """ - When I run `wp package uninstall wp-cli-test/updateable-package` + When I run `wp package uninstall swissspidy/validate-readme-command` Then STDOUT should contain: """ - Removing require statement for package 'wp-cli-test/updateable-package' from + Removing require statement for package 'swissspidy/validate-readme-command' from """ And STDOUT should contain: """ @@ -158,10 +158,10 @@ Feature: Install WP-CLI packages """ And the {PACKAGE_PATH}/vendor directory should not contain: """ - wp-cli-test + swissspidy """ - When I try `wp package is-installed wp-cli-test/updateable-package` + When I try `wp package is-installed swissspidy/validate-readme-command` Then the return code should be 1 And STDERR should be empty And STDOUT should be empty