Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: 1.30.2 creates PHP 8.2 config and ~/.zshrc lines on every start, although 8.2 isn't installed

未关闭
#1,763 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
56/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
macos, php, zsh
领域
desktop, devtools

调研方向

Start by reproducing the startup behavior on macOS with PHP 8.2 uninstalled, then inspect Herd's PHP-version discovery and startup configuration generation. The issue identifies the affected outputs: config/php/82, the 8.2 FPM config files, and the PHP 8.2 lines in ~/.zshrc. Done means startup no longer recreates these files or shell lines for an uninstalled version; verify with the reported reproduction steps.

由索引模型根据 Issue 内容生成。

描述

fixed-in-next-release macOS
Platform

macOS

Operating system version

macOS 27.0.1 (26A434)

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.30.2 (Build: 68)

PHP Version

Not version-specific. Installed: PHP 8.5.10 (global) and 7.4.33. PHP 8.2 is not installed.

Bug description

Since updating to Herd 1.30.2, Herd creates a configuration for PHP 8.2 every time it starts, although PHP 8.2 is not installed:

  • ~/Library/Application Support/Herd/config/php/82/php.ini
  • ~/Library/Application Support/Herd/config/fpm/8.2-fpm.conf
  • ~/Library/Application Support/Herd/config/fpm/8.2-fpm-debug.conf
  • and it appends these lines to ~/.zshrc:

Herd injected PHP 8.2 configuration.

export HERD_PHP_82_INI_SCAN_DIR="/Users//Library/Application Support/Herd/config/php/82"

herd php:list shows 8.2 as "Not Installed", there is no php82 binary in Herd's bin folder, and no site is isolated to 8.2. Only 8.2 is affected; the 7.4 and 8.5 configs are not touched.

Herd 1.30.1 did not do this: none of these existed before, and they appeared the moment 1.30.2 started for the first time.

Expected: Herd writes configuration and shell lines only for PHP versions that are installed, as 1.30.1 did.

Steps to reproduce
  1. Herd 1.30.2 with PHP 8.2 not installed (here: 7.4 and 8.5).
  2. Quit Herd.
  3. Delete config/php/82, config/fpm/8.2-fpm.conf, config/fpm/8.2-fpm-debug.conf and the two "PHP 8.2" lines in ~/.zshrc.
  4. Open Herd.
  5. Within a few seconds the three files are back, and the two lines are appended to ~/.zshrc again.

(My ~/.zshrc is a symlink to a file in a git repository; Herd writes through it, which is how I noticed.)

Relevant log output
$ herd php:list
| 8.5 *   | Installed     |
| 8.4     | Not Installed |
| 8.3     | Not Installed |
| 8.2     | Not Installed |
| 7.4     | Installed     |

$ ls ~/Library/Application\ Support/Herd/bin | grep php
php
php74
php74-fpm
php85
php85-fpm

$ ls ~/Library/Application\ Support/Herd/config/php ~/Library/Application\ Support/Herd/config/fpm
config/fpm: 7.4-fpm.conf 8.2-fpm-debug.conf 8.2-fpm.conf 8.5-fpm.conf
config/php: 74 82 85 cacert.pem
主要语言
没有语言数据
星标
123
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

beyondcode/herd-community 的其他 Issue

查看 beyondcode/herd-community 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。