Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handbook generation when Phar is used directly #476

Merged
merged 4 commits into from
Dec 8, 2023
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
2 changes: 1 addition & 1 deletion bin/command.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private static function update_commands_data( $command, &$commands_data, $full )
}
}
if ( $filename ) {
preg_match( '#wp-cli-dev/([^/]+)#', $filename, $matches );
preg_match( '#(?:vendor/wp-cli/|wp-cli-dev/)([^/]+)#', $filename, $matches );
if ( ! empty( $matches[1] ) ) {
$repo_url = 'https://github.com/wp-cli/' . $matches[1];
}
Expand Down
2 changes: 1 addition & 1 deletion bin/handbook-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"parent": null
},
"contributor-day": {
"title": "WordCamp Contributor Day",
"title": "WP-CLI Hack Day",
"slug": "contributor-day",
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/contributor-day.md",
"parent": null
Expand Down
5 changes: 4 additions & 1 deletion commands/dist-archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ options:
\---

[\--filename-format=<filename-format>]
: Use a custom format for archive filename. Defaults to '{name}.{version}'. This is ignored if a custom filename is provided or version does not exist.
: Use a custom format for archive filename. Available substitutions: {name}, {version}. This is ignored if the <target> parameter is provided or the version cannot be determined.
\---
default: "{name}.{version}"
\---

### GLOBAL PARAMETERS

Expand Down
2 changes: 2 additions & 0 deletions internal-api/wp-cli-utils-http-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Make a HTTP request to a remote URL.
<div>
<strong>$method</strong> (string) HTTP method (GET, POST, DELETE, etc.).<br />
<strong>$url</strong> (string) URL to make the HTTP request to.<br />
<strong>$data</strong> (array|null) Data to send either as a query string for GET/HEAD requests,<br />
<strong>$headers</strong> (array) Add specific headers to the request.<br />
<strong>$options</strong> (array) {<br /> Optional. An associative array of additional request options.<br /> @type bool $halt_on_error Whether or not command execution should be halted on error. Default: true<br /> @type bool|string $verify A boolean to use enable/disable SSL verification<br /> or string absolute path to CA cert to use.<br /> Defaults to detected CA cert bundled with the Requests library.<br /> @type bool $insecure Whether to retry automatically without certificate validation.<br />}<br />
<strong>@return</strong> (object) <br />
Expand All @@ -31,6 +32,7 @@ if ( 20 != substr( $md5_response->status_code, 0, 2 ) ) {
WP_CLI::error( "Couldn't access md5 hash for release (HTTP code {$response->status_code})" );
}
```
or in the body for POST requests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schlessera Where is this coming from? 🤔 Looks a bit out of place

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good catch. Looks like the parsing fails here.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created a new issue for this: #477



*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.*
Expand Down