Platform
macOS
Operating system version
MacOS Tahoe 26.3.1 (25D2128)
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.28.0 (Build: 64)
PHP Version
No response
Bug description
Running herd init in a project with a herd.yml that includes a valkey extra service produces the following PHP warnings:
Warning: Undefined array key 1 in phar://.../cli/Valet/Herd.php on line 326
Warning: Undefined array key "status" in phar://.../cli/Valet/Herd.php on line 328
The services start correctly, but the warnings are thrown on every herd init. The root cause is in two functions — isExtraServiceRunning and startExtraService in Herd.php — which parse AppleScript responses by splitting on , then : , but do not guard against items that contain no :. When the Valkey service response doesn't match the expected key:value format, $result[1] is undefined and $serviceInfo['status'] doesn't exist.
The fix would be to add null coalescing in both functions, consistent with how other functions in the same file already handle this safely ($result[1] ?? null).
Steps to reproduce
Steps to reproduce:
- Create a herd.yml with a valkey service entry
- Run herd init in that directory
- Observe the PHP warnings printed to the terminal
Relevant log output
Warning: Undefined array key 1 in phar://.../cli/Valet/Herd.php on line 326
Warning: Trying to access array offset on null in phar://.../cli/Valet/Herd.php on line 326
Warning: Undefined array key "status" in phar://.../cli/Valet/Herd.php on line 328
Platform
macOS
Operating system version
MacOS Tahoe 26.3.1 (25D2128)
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.28.0 (Build: 64)
PHP Version
No response
Bug description
Running
herd initin a project with a herd.yml that includes a valkey extra service produces the following PHP warnings:Warning: Undefined array key 1 in phar://.../cli/Valet/Herd.php on line 326Warning: Undefined array key "status" in phar://.../cli/Valet/Herd.php on line 328The services start correctly, but the warnings are thrown on every herd init. The root cause is in two functions —
isExtraServiceRunningandstartExtraServicein Herd.php — which parse AppleScript responses by splitting on,then:, but do not guard against items that contain no:. When the Valkey service response doesn't match the expectedkey:valueformat,$result[1]is undefined and$serviceInfo['status']doesn't exist.The fix would be to add null coalescing in both functions, consistent with how other functions in the same file already handle this safely (
$result[1] ?? null).Steps to reproduce
Steps to reproduce:
Relevant log output