Skip to content

Tags: wp-cli/wp-cli-tests

Tags

v5.3.5

Toggle v5.3.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update to `johnbillion/wp-compat` v3 (#370)

v5.3.4

Toggle v5.3.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Account for optional keys in `get_flag_value()` return type (#368)

v5.3.3

Toggle v5.3.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Install WordPress from roots/wordpress-full in Composer-based tests (#…

…365)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

v5.3.2

Toggle v5.3.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Make the PHP built-in web server step work without server-command (#363)

* Make the PHP built-in web server step work without server-command

`start_php_server()` always passed `{RUN_DIR}/vendor/wp-cli/server-command/router.php`
as the router script, but no built-in step puts wp-cli/server-command into
the run directory (`Given a WP installation with Composer` only requires
WordPress core). PHP then fails every request with a fatal error while
trying to open the router, and with `display_errors=On` that error page is
even served with a 200 status, so a scenario serving static files gets an
error page instead of its fixture and a missing file never yields a 404.

Only pass the router when it actually exists, looking in the run directory
first and then in the vendor directory of the project under test. Without a
router, PHP's built-in web server serves the directory as-is, which is what
a plain directory of files needs.

The `Then the HTTP status code should be` step relied on the Requests v1
class, which WP-CLI no longer autoloads, so it failed with a fatal error
before the request was made. Use whichever Requests version WP-CLI ships.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019g8sd6U4w59qiQW7LTt1jG

* Honor a custom Composer vendor-dir and assert the served response

Look up the server-command router in the vendor directory configured in
the run directory's composer.json, so that a WP installation with a custom
vendor directory is covered as well.

Extend the scenarios to check the response body and a real 404, so that
they fail against the old behavior of serving PHP's fatal-error page with
a 200 status. PHP's built-in web server falls back to index.html for
unknown paths when it exists, so the 404 case lives in its own scenario
without an index file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019g8sd6U4w59qiQW7LTt1jG

* Avoid $argv in the feature file fixture

PHPStan flags `$argv` as possibly undefined in the PHP blocks of feature
files, so read the argument from `$_SERVER['argv']` instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019g8sd6U4w59qiQW7LTt1jG

* Use get_headers() in the feature file fixture

PHP 8.5 deprecates the `$http_response_header` variable, and the
deprecation notice on STDERR fails the `I run` step.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019g8sd6U4w59qiQW7LTt1jG

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

v5.3.1

Toggle v5.3.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Check the PHP blocks in feature files as the space-indented code they…

… are (#362)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>

v5.3.0

Toggle v5.3.0's commit message
Update file(s) from wp-cli/.github

v5.2.3

Toggle v5.2.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add WP-Compat PHPStan extension configuration (#360)

Co-authored-by: Claude <noreply@anthropic.com>

v5.2.2

Toggle v5.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
PHPStan: Resolve GlobalConfig dynamically in WPCliGetConfigDynamicRet…

…urnTypeExtension (#347)

v5.2.1

Toggle v5.2.1's commit message

Verified

This commit was signed with the committer’s verified signature.
swissspidy Pascal Birchler
Update package requirements

v5.2.0

Toggle v5.2.0's commit message

Verified

This commit was signed with the committer’s verified signature.
swissspidy Pascal Birchler
Require WP-CLI v3