[Bug]: herd php:install ignores the version argument and asks which version to install
まだ誰も着手していません。
評価
調査の方向性
まず php:install コマンドを見つけ、issue の説明に従って、そのバージョン引数を php:update コマンドの phpVersion 引数と比較します。コマンドのヘルプを確認し、herd php:install 8.4 で再現して、引数が無視されることを確認します。コマンドが確認を求めずに指定されたバージョンをインストールしたら完了です。対話型と非対話型の動作を確認してください。
索引モデルが issue の本文から書いたものです。
説明
Platform
macOS
Operating system version
macOS 27.0.1 (26A434)
System architecture
ARM64 (M1, M2, etc)
Herd Version
2.0.2 (Build: 71)
PHP Version
Not version-specific (global PHP here: 8.5.10)
Bug description
herd php:install 8.4 ignores the 8.4: instead of installing PHP 8.4 it asks "Which PHP version do you want to install?". That is the usage shown in the docs (herd php:install 8.3), in herd list and in herd php:install --help (php:install [<version>]).
In a terminal you can pick the version from the list. Without one (CI, an AI agent, input from a pipe) the command fails with exit code 1 and tells you to "Pass the value as an argument or option instead", although it was passed (log below).
Expected: herd php:install 8.4 installs PHP 8.4 without asking.
Cause, read in herd.phar 2.0.2: Silly's Application::command() merges $input->getOptions() after $input->getArguments(), so Symfony Console's global --version option (false when not given) overwrites the argument that is also named version. php:install is the only Herd command with an argument of that name; php:update [phpVersion] and isolate [phpVersion] are not affected.
Suggestion: rename the argument to phpVersion, as php:update does.
Workaround: install the version in Settings → PHP, or pick it from the list in a terminal.
Steps to reproduce
- Herd 2.0.2 with a PHP version that is not installed (here 8.4).
- In a terminal, run
herd php:install 8.4: it asks which version to install instead of installing 8.4. Press Ctrl-C (nothing is installed). - Without a terminal:
herd php:install 8.4 < /dev/nullfails with exit code 1.
Relevant log output
$ herd php:install 8.4
┌ Which PHP version do you want to install? ───────────────────┐
│ › ● 8.6 ┃ │
│ ○ 8.4 │ │
│ ○ 8.3 │ │
│ ○ 8.2 │ │
│ ○ 8.1 │ │
└──────────────────────────────────────────────────────────────┘
⚠ Cancelled.
# (Ctrl-C pressed at the question)
$ herd php:install 8.4 < /dev/null; echo "exit=$?"
In app.php line 92:
"herd php:install" asked a question but no terminal is attached to answer i
t. Pass the value as an argument or option instead (see "herd help php:inst
all").
php:install [<version>]
exit=1
- 主要言語
- 言語のデータがありません
- スター
- 124
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
beyondcode/herd-community のほかの issue
-
[Bug]: PHP 8.3 php.ini missing auto_prepend_file and herd-ext extension lines (dump() undefined)オープンmacOS
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
beyondcode/herd-community#1693 ·
-
macOS
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
beyondcode/herd-community#1602 ·
-
[Bug]: herd restart skips PHP versions used only by isolated sites ("Restarting PHP $_sock_...")オープンmacOS
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
beyondcode/herd-community#1770 · コメント 1 件 ·
-
windows
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
beyondcode/herd-community#1769 ·
-
macOS needs more information
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
beyondcode/herd-community#1755 · コメント 1 件 ·
beyondcode/herd-community の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
gavin-wolfe/wolfden#104 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vercel-labs/portless#486 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/rocketmq-dashboard#7243 ·
メンテナーはふだん 3 日以内に返信
-
RubyGems
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信