-
Notifications
You must be signed in to change notification settings - Fork 355
Add alias field support to command documentation generation #605
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
Conversation
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
|
The workflow is currently failing because of an autoloader issue. Specifically, So strangely, the But of course, ideally this would try to autoload the class from this package's vendor folder, not the Phar. The issue seems to be with the If I remove it and run ^ @schlessera in case you have any ideas. |
|
@swissspidy When you run anything with To make this work more reliably, we'd need to ensure that all dependencies are correctly declared here in the Composer file, and the run the command via UPDATE: Oh, sorry, I did not notice that you already had the |
|
Not sure I understand the problem here correctly.
|
In #590 and #606 I added a new GitHub Actions workflow that regenerates the handbook for us. It follows the README:
But it doesn't work, giving this error instead. Even when I do this locally. Specifically it's the
Doesn't work, because then the command is loaded twice. What I've tried:
|
|
wp-cli/wp-cli-tests#292 should fix some of the issues I've encountered here. Let's see... |
The
setcommand was used in examples (wp post meta set 123 _wp_page_template about.php) but not documented as a subcommand. Per agent instructions, WP-CLI now includes an optionalaliasfield in command definitions that needs to be surfaced in documentation.Changes
Template: Modified
subcmd-list.mustacheto display alias notation when present using Mustache conditional syntax{{#alias}}**Alias:**{{alias}}{{/alias}}Generator: Extended
gen_cmd_pages()inbin/command.phpto automatically create alias documentation pages. When a command has analiasfield, generates a separate page at the alias path with a backlink to the main command.Result
When
wp post meta updatehasalias: 'set'in its command definition:commands/post/meta/update.mddisplays: Alias:setcommands/post/meta/set.mdis generated with note: "This is an alias forwp post meta update"Both commands are now discoverable in documentation, matching their runtime availability.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/Behat/Behat/zipball/51bdf81639a14645c5d2c06926f4aa37d204921b/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/Behat/Gherkin/zipball/e26037937dfd48528746764dd870bc5d0836665f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/c216317e96c8b3f5932808f9b0f1f7a14e3bbf55/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/e0f0e5a3dc819a4a0f8d679a0f2453d941976e18/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/134921bfca9b02d8f374c48381451da1d98402f9/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/7adfefd530aa2d7570ba87100a99e2483a543b88/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/5b4803384d3303cf8e84141039ef56c8a123138d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/5171cb6650e6c583a96943fd6ea0dfa3e1089a8a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f94d246cc143ec5a23da868f8f7e1393b50eaa82/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/72a6721c9b64b3e4c9db55abbc38f790b318267e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b564ca479e7e735f750aaac4935af965572a7845/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/24a711b5c916efc6d6e62aa65aa2ec98fef77f68/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6dc2e076d09960efbb0c1272aa9bc156fc80955e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/swissspidy/phpstan-no-private/zipball/f7a1890e350c8d8bf26370426a971d7490ae4245/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/console/zipball/6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/dependency-injection/zipball/baf614f7c15b30ba6762d4b1ddabdf83dbf0d29b/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/translation/zipball/2d01ca0da3f092f91eeedb46f24aa30d2fca8f68/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/symfony/yaml/zipball/24dd4de28d2e3988b311751ac49e684d783e2345/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/theseer/tokenizer/zipball/7989e43bf381af0eac72e4f0ca5bcbfa81658be4/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/wp-cli/php-cli-tools/zipball/f12b650d3738e471baed6dd47982d53c5c0ab1c3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/wp-cli/spyc/zipball/6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)https://api.github.com/repos/wp-cli/wp-cli-tests/zipball/ca81720aec0e93fde5ec6e3ca4d5ede65108b718/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QIjqJX /usr/bin/composer install --no-interaction ndor/bin/grep alias d nfig/composer/ve-v grep -l alias e/reset.md ep alias he/replace.md /opt/pipx_bin/grep grep(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
setcommand towp post metadocumentation #588✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.