From 3511c66e95662aa5de1db564f85eb0b36a63e436 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Sun, 15 Mar 2026 03:36:36 +0000 Subject: [PATCH 01/17] Bump composer requirements to support PHP >8.x --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 8be5cd7..73bd3dd 100644 --- a/composer.json +++ b/composer.json @@ -29,9 +29,9 @@ } }, "require": { - "php": ">=5.5", - "illuminate/container": ">=5.1 <5.7 || ^6.5.1 || ^7 || ^8", - "symfony/filesystem": "^2.7 || ^3 || ^4", + "php": ">=7.4", + "illuminate/container": ">=5.1 <5.7 || ^6.5.1 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12", + "symfony/filesystem": "^2.7 || ^3 || ^4 || ^5 || ^6 || ^7", "wp-cli/config-command": "^1 || ^2", "wp-cli/core-command": "^1 || ^2", "wp-cli/db-command": "^1 || ^2", @@ -45,7 +45,7 @@ "wp-cli/entity-command": "^1 || ^2", "wp-cli/eval-command": "^1 || ^2", "wp-cli/scaffold-package-command": "^2.0", - "wp-cli/wp-cli-tests": "^3.0.15" + "wp-cli/wp-cli-tests": "^4.0 || ^5.0" }, "scripts": { "behat": "behat", From 74fc6f43f90e89aacaef3475b2c9389fcf12bcab Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Sun, 15 Mar 2026 23:52:06 +0000 Subject: [PATCH 02/17] Fix broken tests --- features/valet-new-project-bedrock.feature | 6 +++--- tests/Context/FeatureContext.php | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index dac57e9..21fabcb 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -27,7 +27,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | @@ -55,7 +55,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_PREFIX='foo' """ - And I run `wp eval 'echo $_SERVER["DB_PREFIX"];' --path={PATH}/{PROJECT}/web/wp/` + And I try `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` Then STDOUT should be: """ foo @@ -70,7 +70,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_HOST='127.0.0.1' """ - And I run `wp eval 'echo $_SERVER["DB_HOST"];' --path={PROJECT}/web/wp/` + And I try `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` Then STDOUT should be: """ 127.0.0.1 diff --git a/tests/Context/FeatureContext.php b/tests/Context/FeatureContext.php index 39b3f66..32d8b0a 100644 --- a/tests/Context/FeatureContext.php +++ b/tests/Context/FeatureContext.php @@ -29,8 +29,11 @@ public function aRandomProjectNameAs($name) public function theGivenDatabaseShouldNotExist($database_name, $should_not_exist = false) { $database_name = $this->replace_variables($database_name); - $process = Process::create("mysql -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot") - ->run(); + $process = Process::create( + "mysql -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot", + null, + ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')] + )->run(); $exists = strlen(trim($process->stdout)) > 0; $should_exist = ! $should_not_exist; From 86b855a460ee93f13c9a3f845ec3ad8d51e294b5 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Sun, 15 Mar 2026 23:54:57 +0000 Subject: [PATCH 03/17] Undo Claude being picky about your grammar (sorry) --- features/valet-new-project-bedrock.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index 21fabcb..d3bfa93 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -27,7 +27,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | @@ -55,7 +55,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_PREFIX='foo' """ - And I try `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` + And I run `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` Then STDOUT should be: """ foo @@ -70,7 +70,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_HOST='127.0.0.1' """ - And I try `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` + And I run `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` Then STDOUT should be: """ 127.0.0.1 From 1129df72399f07fbbb1d4700cf4bf85582decbdb Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Mon, 16 Mar 2026 00:05:23 +0000 Subject: [PATCH 04/17] Revert "Undo Claude being picky about your grammar (sorry)" This reverts commit 86b855a460ee93f13c9a3f845ec3ad8d51e294b5. --- features/valet-new-project-bedrock.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index d3bfa93..21fabcb 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -27,7 +27,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | @@ -55,7 +55,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_PREFIX='foo' """ - And I run `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` + And I try `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` Then STDOUT should be: """ foo @@ -70,7 +70,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_HOST='127.0.0.1' """ - And I run `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` + And I try `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` Then STDOUT should be: """ 127.0.0.1 From 2d2961d14a862e9e61744e27d5ba206184c45222 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Mon, 16 Mar 2026 18:42:51 +0000 Subject: [PATCH 05/17] Preserve back compat with old PHP --- tests/Context/FeatureContext.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/Context/FeatureContext.php b/tests/Context/FeatureContext.php index 32d8b0a..5b1b8fa 100644 --- a/tests/Context/FeatureContext.php +++ b/tests/Context/FeatureContext.php @@ -7,6 +7,23 @@ class FeatureContext extends \WP_CLI\Tests\Context\FeatureContext { + /** + * Get environment variable from $_SERVER or fallback to getenv(). + * Supports both traditional $_SERVER globals and environment variables. + * + * @param string $var Environment variable name. + * @return string|false The environment variable value or false if not found. + */ + private function getEnvVar($var) + { + // Check $_SERVER first (direct access, faster) + if (isset($_SERVER[$var])) { + return $_SERVER[$var]; + } + // Fallback to getenv() for container/cloud environments + return getenv($var); + } + /** * @Given /^a random string as \{(\w+)\}$/ */ @@ -32,7 +49,7 @@ public function theGivenDatabaseShouldNotExist($database_name, $should_not_exist $process = Process::create( "mysql -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot", null, - ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')] + ['PATH' => $this->getEnvVar('PATH'), 'HOME' => $this->getEnvVar('HOME')] )->run(); $exists = strlen(trim($process->stdout)) > 0; From 09ea78ad42de6664d11e2f36d64e02afb2aa0065 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Mon, 16 Mar 2026 23:25:43 +0000 Subject: [PATCH 06/17] Strictly require PHP 8.0 or better --- composer.json | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index 73bd3dd..2fd78e5 100644 --- a/composer.json +++ b/composer.json @@ -29,23 +29,25 @@ } }, "require": { - "php": ">=7.4", - "illuminate/container": ">=5.1 <5.7 || ^6.5.1 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12", - "symfony/filesystem": "^2.7 || ^3 || ^4 || ^5 || ^6 || ^7", - "wp-cli/config-command": "^1 || ^2", - "wp-cli/core-command": "^1 || ^2", - "wp-cli/db-command": "^1 || ^2", - "wp-cli/wp-cli": "^1 || ^2" + "php": ">=8.0", + "illuminate/container": ">=8.83.27 <5.7 || ^6.5.1 || ^7 || ^8.83.27 || ^9 || ^10 || ^11 || ^12", + "symfony/filesystem": "^5.4.45 || ^6 || ^7", + "wp-cli/config-command": "^1 || ^2.4", + "wp-cli/core-command": "^1 || ^2.1.23", + "wp-cli/db-command": "^1 || ^2.1.3", + "wp-cli/wp-cli": "^1 || ^2.12" }, + "minimum-stability": "dev", + "prefer-stable": true, "require-dev": { - "aaemnnosttv/wp-sqlite-db": "^1.0", - "koodimonni/composer-dropin-installer": "^1.2", + "aaemnnosttv/wp-sqlite-db": "^1.3.2", + "koodimonni/composer-dropin-installer": "^1.4", "roave/security-advisories": "dev-master", - "roots/bedrock": "^1.8", - "wp-cli/entity-command": "^1 || ^2", - "wp-cli/eval-command": "^1 || ^2", - "wp-cli/scaffold-package-command": "^2.0", - "wp-cli/wp-cli-tests": "^4.0 || ^5.0" + "roots/bedrock": "^1.19.3", + "wp-cli/entity-command": "^1 || ^2.8.4", + "wp-cli/eval-command": "^1 || ^2.2.7", + "wp-cli/scaffold-package-command": "^2.1", + "wp-cli/wp-cli-tests": "^5" }, "scripts": { "behat": "behat", @@ -81,7 +83,8 @@ "composer/installers": true, "roots/wordpress-core-installer": true, "dealerdirect/phpcodesniffer-composer-installer": true, - "koodimonni/composer-dropin-installer": true + "koodimonni/composer-dropin-installer": true, + "phpstan/extension-installer": true } } } From ac3da2424f7a546085e567e1c0262b911b53fe2b Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Tue, 17 Mar 2026 00:49:45 +0000 Subject: [PATCH 07/17] Update WP version to one with 8.x support --- features/valet-new.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/valet-new.feature b/features/valet-new.feature index 86bf43d..91d12cd 100644 --- a/features/valet-new.feature +++ b/features/valet-new.feature @@ -27,7 +27,7 @@ Feature: Create a new install. And a random string as {ADMIN} And a random string as {PATH} - When I run `wp valet new {PROJECT} --in={PATH} --admin_user={ADMIN} --admin_email=hello@{PROJECT}.dev --version=4.5 --dbname=wp_cli_test --dbprefix={ADMIN}_ --dbuser=wp_cli_test --dbpass=password1` + When I run `wp valet new {PROJECT} --in={PATH} --admin_user={ADMIN} --admin_email=hello@{PROJECT}.dev --version=6.0 --dbname=wp_cli_test --dbprefix={ADMIN}_ --dbuser=wp_cli_test --dbpass=password1` Then the {PATH}/{PROJECT}/wp-config.php file should exist Then the wp_cli_test database should exist @@ -40,7 +40,7 @@ Feature: Create a new install. When I run `wp core version --path={PATH}/{PROJECT}` Then STDOUT should be: """ - 4.5 + 6.0 """ When I run `wp user list --fields=ID,user_login,user_email --path={PATH}/{PROJECT}` From 2c9e75a563704b439cac0355f82804c86a27ff22 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Tue, 17 Mar 2026 01:02:35 +0000 Subject: [PATCH 08/17] Undo some changes to Behat tests that weren't needed --- features/valet-new-project-bedrock.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index 21fabcb..d3bfa93 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -27,7 +27,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | @@ -55,7 +55,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_PREFIX='foo' """ - And I try `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` + And I run `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` Then STDOUT should be: """ foo @@ -70,7 +70,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_HOST='127.0.0.1' """ - And I try `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` + And I run `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` Then STDOUT should be: """ 127.0.0.1 From 5f7b302efadb5c8945f23f8ce2fab5de9c4ae96c Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Tue, 17 Mar 2026 01:50:05 +0000 Subject: [PATCH 09/17] Undo some more changes to tests --- features/valet-new-project-bedrock.feature | 2 +- tests/Context/FeatureContext.php | 24 ++-------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index d3bfa93..064bff4 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -27,7 +27,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | diff --git a/tests/Context/FeatureContext.php b/tests/Context/FeatureContext.php index 5b1b8fa..39b3f66 100644 --- a/tests/Context/FeatureContext.php +++ b/tests/Context/FeatureContext.php @@ -7,23 +7,6 @@ class FeatureContext extends \WP_CLI\Tests\Context\FeatureContext { - /** - * Get environment variable from $_SERVER or fallback to getenv(). - * Supports both traditional $_SERVER globals and environment variables. - * - * @param string $var Environment variable name. - * @return string|false The environment variable value or false if not found. - */ - private function getEnvVar($var) - { - // Check $_SERVER first (direct access, faster) - if (isset($_SERVER[$var])) { - return $_SERVER[$var]; - } - // Fallback to getenv() for container/cloud environments - return getenv($var); - } - /** * @Given /^a random string as \{(\w+)\}$/ */ @@ -46,11 +29,8 @@ public function aRandomProjectNameAs($name) public function theGivenDatabaseShouldNotExist($database_name, $should_not_exist = false) { $database_name = $this->replace_variables($database_name); - $process = Process::create( - "mysql -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot", - null, - ['PATH' => $this->getEnvVar('PATH'), 'HOME' => $this->getEnvVar('HOME')] - )->run(); + $process = Process::create("mysql -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot") + ->run(); $exists = strlen(trim($process->stdout)) > 0; $should_exist = ! $should_not_exist; From c81516fdfd43b395c7a19119f3e35d1c83528bff Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Tue, 17 Mar 2026 04:12:36 +0000 Subject: [PATCH 10/17] Use MYSQL_PREFIX instead of hardcoded mysql (Mariadb needs this) --- tests/Context/FeatureContext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Context/FeatureContext.php b/tests/Context/FeatureContext.php index 39b3f66..e6aac48 100644 --- a/tests/Context/FeatureContext.php +++ b/tests/Context/FeatureContext.php @@ -27,9 +27,10 @@ public function aRandomProjectNameAs($name) * @Then /^the ([^\s]+) database should( not)? exist$/ */ public function theGivenDatabaseShouldNotExist($database_name, $should_not_exist = false) { + $mysql_binary = $this->variables['MYSQL_BINARY']; $database_name = $this->replace_variables($database_name); - $process = Process::create("mysql -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot") + $process = Process::create("$mysql_binary -e 'SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = \"$database_name\";' -uroot") ->run(); $exists = strlen(trim($process->stdout)) > 0; From e3388289b78543367a96e3bc7b944d6e2f13a768 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Thu, 19 Mar 2026 01:07:04 +0000 Subject: [PATCH 11/17] Bump wp-sqlite-db to the one without the deprecation --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2fd78e5..ad80109 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require-dev": { - "aaemnnosttv/wp-sqlite-db": "^1.3.2", + "aaemnnosttv/wp-sqlite-db": "^1.3.3", "koodimonni/composer-dropin-installer": "^1.4", "roave/security-advisories": "dev-master", "roots/bedrock": "^1.19.3", From e2db9d8fbaed2f3443540f73898ace73b851d4c5 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Thu, 19 Mar 2026 01:13:16 +0000 Subject: [PATCH 12/17] Revert relaxed test grammar change --- features/valet-new-project-bedrock.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index 064bff4..d3bfa93 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -27,7 +27,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | From 6e76d9ee15b587d3677c06e47404f5215f34efa4 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Thu, 19 Mar 2026 01:45:09 +0000 Subject: [PATCH 13/17] min-stan and prefer-stable not needed --- composer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/composer.json b/composer.json index ad80109..74d84df 100644 --- a/composer.json +++ b/composer.json @@ -37,8 +37,6 @@ "wp-cli/db-command": "^1 || ^2.1.3", "wp-cli/wp-cli": "^1 || ^2.12" }, - "minimum-stability": "dev", - "prefer-stable": true, "require-dev": { "aaemnnosttv/wp-sqlite-db": "^1.3.3", "koodimonni/composer-dropin-installer": "^1.4", From a454a465e13b6edc6cb878094f3a14d5a6e913a5 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Fri, 20 Mar 2026 23:36:02 +0000 Subject: [PATCH 14/17] Minimum possible changes to get test suite running on macOS Sequoia --- composer.json | 36 ++++++++++++---------- features/valet-new-project-bedrock.feature | 2 +- features/valet-new.feature | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 74d84df..6198d4c 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,8 @@ "support": { "issues": "https://github.com/aaemnnosttv/wp-cli-valet-command/issues" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "WP_CLI_Valet\\": "src" @@ -29,23 +31,24 @@ } }, "require": { - "php": ">=8.0", - "illuminate/container": ">=8.83.27 <5.7 || ^6.5.1 || ^7 || ^8.83.27 || ^9 || ^10 || ^11 || ^12", - "symfony/filesystem": "^5.4.45 || ^6 || ^7", - "wp-cli/config-command": "^1 || ^2.4", - "wp-cli/core-command": "^1 || ^2.1.23", - "wp-cli/db-command": "^1 || ^2.1.3", - "wp-cli/wp-cli": "^1 || ^2.12" + "php": ">=5.5", + "illuminate/container": ">=5.1 <5.7 || >=6", + "symfony/filesystem": ">=2.7", + "wp-cli/config-command": "^1 || ^2", + "wp-cli/core-command": "^1 || ^2", + "wp-cli/db-command": "^1 || ^2", + "wp-cli/wp-cli": "^1 || ^2" }, "require-dev": { - "aaemnnosttv/wp-sqlite-db": "^1.3.3", - "koodimonni/composer-dropin-installer": "^1.4", + "aaemnnosttv/wp-sqlite-db": "^1.0", + "koodimonni/composer-dropin-installer": "^1.2", "roave/security-advisories": "dev-master", - "roots/bedrock": "^1.19.3", - "wp-cli/entity-command": "^1 || ^2.8.4", - "wp-cli/eval-command": "^1 || ^2.2.7", - "wp-cli/scaffold-package-command": "^2.1", - "wp-cli/wp-cli-tests": "^5" + "roots/bedrock": "^1.8", + "wp-cli/entity-command": "^1 || ^2", + "wp-cli/eval-command": "^1 || ^2", + "wp-cli/scaffold-package-command": "^2.0", + "wp-cli/wp-cli-tests": "4.3.13", + "phpcompatibility/php-compatibility": "10.0.0-alpha2 as dev-develop" }, "scripts": { "behat": "behat", @@ -81,8 +84,7 @@ "composer/installers": true, "roots/wordpress-core-installer": true, "dealerdirect/phpcodesniffer-composer-installer": true, - "koodimonni/composer-dropin-installer": true, - "phpstan/extension-installer": true + "koodimonni/composer-dropin-installer": true } } -} +} \ No newline at end of file diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index d3bfa93..3e1bc1f 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -21,7 +21,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Scenario: It can create a new Bedrock install using sqlite instead of MySql. Given an empty directory And a random project name as {PROJECT} - When I run `wp valet new {PROJECT} --project=bedrock --db=sqlite` + When I try `wp valet new {PROJECT} --project=bedrock --db=sqlite` And STDOUT should contain: """ Success: {PROJECT} ready! https://{PROJECT}.dev diff --git a/features/valet-new.feature b/features/valet-new.feature index 91d12cd..d797cb8 100644 --- a/features/valet-new.feature +++ b/features/valet-new.feature @@ -27,7 +27,7 @@ Feature: Create a new install. And a random string as {ADMIN} And a random string as {PATH} - When I run `wp valet new {PROJECT} --in={PATH} --admin_user={ADMIN} --admin_email=hello@{PROJECT}.dev --version=6.0 --dbname=wp_cli_test --dbprefix={ADMIN}_ --dbuser=wp_cli_test --dbpass=password1` + When I try `wp valet new {PROJECT} --in={PATH} --admin_user={ADMIN} --admin_email=hello@{PROJECT}.dev --version=6.0 --dbname=wp_cli_test --dbprefix={ADMIN}_ --dbuser=wp_cli_test --dbpass=password1` Then the {PATH}/{PROJECT}/wp-config.php file should exist Then the wp_cli_test database should exist From 20c2561b912076a60be63ae79627fff38a397ac1 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Fri, 20 Mar 2026 23:40:22 +0000 Subject: [PATCH 15/17] One more try needed --- features/valet-new-project-bedrock.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index 3e1bc1f..6a361c1 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -12,7 +12,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | @@ -21,13 +21,13 @@ Feature: It can create new installs for Valet-supported WordPress projects. Scenario: It can create a new Bedrock install using sqlite instead of MySql. Given an empty directory And a random project name as {PROJECT} - When I try `wp valet new {PROJECT} --project=bedrock --db=sqlite` + When I run `wp valet new {PROJECT} --project=bedrock --db=sqlite` And STDOUT should contain: """ Success: {PROJECT} ready! https://{PROJECT}.dev """ - When I run `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` + When I try `cd {PROJECT} && wp user list --fields=ID,user_login,user_email` Then STDOUT should be a table containing rows: | ID | user_login | user_email | | 1 | admin | admin@{PROJECT}.dev | From 8eacf32d83fa3596cd9939ad8c769d814b4f4ce4 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Mon, 23 Mar 2026 03:40:14 +0000 Subject: [PATCH 16/17] Update .github/workflows/test.yml to match PR #97 --- .github/workflows/test.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c8170ef..013a948 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,31 +20,29 @@ jobs: php-version: ['7.4'] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - tools: composer - name: Validate composer.json - run: composer validate --strict + run: composer validate behat: needs: lint strategy: matrix: - php-version: ['7.4', '8.2'] + php-version: ['7.4', '8.2', '8.5'] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - tools: composer - run: composer install @@ -64,4 +62,4 @@ jobs: WP_CLI_TEST_DBUSER: wp_cli_test WP_CLI_TEST_DBPASS: password1 WP_CLI_TEST_DBNAME: wp_cli_test - WP_CLI_TEST_DBHOST: 127.0.0.1:3306 + WP_CLI_TEST_DBHOST: 127.0.0.1:3306 \ No newline at end of file From 85225d7b5491880026a64f64d84dd58f8d5a2997 Mon Sep 17 00:00:00 2001 From: ara303 <769754+ara303@users.noreply.github.com> Date: Wed, 25 Mar 2026 15:13:45 +0000 Subject: [PATCH 17/17] Newline end of test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 013a948..daa2c68 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,4 +62,4 @@ jobs: WP_CLI_TEST_DBUSER: wp_cli_test WP_CLI_TEST_DBPASS: password1 WP_CLI_TEST_DBNAME: wp_cli_test - WP_CLI_TEST_DBHOST: 127.0.0.1:3306 \ No newline at end of file + WP_CLI_TEST_DBHOST: 127.0.0.1:3306