[Bug]: herd php:install ignores the version argument and asks which version to install
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 83/100
Línea de trabajo
Empieza por localizar el comando php:install y comparar su argumento de versión con el argumento phpVersion del comando php:update, tal como se describe en el issue. Consulta la ayuda del comando y reproduce el problema con herd php:install 8.4 para confirmar que se ignora el argumento. La tarea está terminada cuando el comando instala la versión solicitada sin preguntar; verifica el comportamiento interactivo y no interactivo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 124
- Forks
- 1
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de beyondcode/herd-community
-
macOS
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
beyondcode/herd-community#1774 ·
-
[Bug]: PHP 8.3 php.ini missing auto_prepend_file and herd-ext extension lines (dump() undefined)AbiertomacOS
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
beyondcode/herd-community#1693 ·
-
macOS
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
beyondcode/herd-community#1602 ·
-
windows
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
beyondcode/herd-community#1779 ·
-
needs more information windows
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
beyondcode/herd-community#1778 · 1 comentario ·
Todos los issues de beyondcode/herd-community
Issues similares
-
area:agent-view area:tui bug platform:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anthropics/claude-code#104558 ·
Los mantenedores suelen responder en 1 día
-
ll-builder shell completions omit existing lockfile commands and --lockedPosiblemente ocupada @project-nju-learner la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
OpenAtom-Linyaps/linyaps#2291 ·
Los mantenedores suelen responder en 1 día
-
roadmap-100
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Theme switch hangs in omarchy-theme-set-browser when Brave Origin runs and brave-bin is installedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
ggml-org/whisper.cpp#4126 ·
Los mantenedores suelen responder en 4 días