Skip to content
Open
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
31 changes: 16 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@
}
},
"require": {
"php": ">=5.5",
"illuminate/container": ">=5.1 <5.7 || ^6.5.1 || ^7 || ^8",
"symfony/filesystem": "^2.7 || ^3 || ^4",
"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"
},
"require-dev": {
"aaemnnosttv/wp-sqlite-db": "^1.0",
"koodimonni/composer-dropin-installer": "^1.2",
"aaemnnosttv/wp-sqlite-db": "^1.3.3",
"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": "^3.0.15"
"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",
Expand Down Expand Up @@ -81,7 +81,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
}
}
}
4 changes: 2 additions & 2 deletions features/valet-new-project-bedrock.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 run `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/`
Then STDOUT should be:
"""
foo
Expand All @@ -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 run `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/`
Then STDOUT should be:
"""
127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions features/valet-new.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}`
Expand Down
3 changes: 2 additions & 1 deletion tests/Context/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down