Repository navigation
phpup 1.3.0 (macOS/Linux)
phpup 1.3.0 (macOS/Linux)
phpup.sh 1.3.0. Feature release adding the machine-readable CLI to the macOS and Linux
script, matching phpup.ps1 2.5.0 so one caller works on every platform.
Contract: docs/CLI.md.
Install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/DaFa66/phpup/v1.3.0-nix/phpup.sh)"Backend selection is unchanged: Homebrew by default on macOS, apt on Debian/Ubuntu, and
PHPPUP_BACKEND=port still selects MacPorts. No arguments behaves exactly as before.
Added
status,start,stop,restart,version,helpverbs, with--jsonemitting the
same schema the Windows script emits--fastfor polling, and--watch N: one long-lived process emitting an NDJSON status line
every N seconds--quiet, plus documented exit codes: 0 ok, 1 failed, 2 usage, 3 not installed,
4 elevation required, 5 port conflictservices.items[]in the payload: per-service{name, registered, enabled}, so registered
services are visible on systemd and Homebrew alike- Single source of truth for derived paths, and the header comment is the only place the
version is written: both--versionpaths read it
Fixed
uclaimed "[ OK ] UPDATE COMPLETE!" even when the stack did not come up: the line was
printed unconditionally after all three backend branches. Eachstart_servicescall now
setsupdate_ok=0on failure, and the closing message distinguishes "packages updated and
stack up" from "packages updated, stack did not come up"- The apt path could block on a dpkg conffile prompt:
apt upgradewas the only apt call
in the script withoutDEBIAN_FRONTEND=noninteractive, so aphp.iniorhttpd.conf
question could stall an unattended run and swallow whatever was queued on stdin - Linux paid about 420ms for
brew --versionon every run: the Homebrew probe ran
unconditionally, including on apt systems. Now gated onUSE_APT == 0; interactive
statuson Ubuntu went from 0.74s to 0.34s - PHP version detection spawned three binaries per status call: config values are used
first, with probing as a per-component fallback
Verified by
PHP 8.5.12 upgrade path on Debian 13 and Ubuntu 24.04, port pins checked against
ports.macports.org for the macOS side.