Skip to content

phpup 1.3.0 (macOS/Linux)

Choose a tag to compare

@DaFa66 DaFa66 released this 22 Oct 11:01
· 18 commits to main since this release

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, help verbs, with --json emitting the
    same schema the Windows script emits
  • --fast for 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 conflict
  • services.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 --version paths read it

Fixed

  • u claimed "[ OK ] UPDATE COMPLETE!" even when the stack did not come up: the line was
    printed unconditionally after all three backend branches. Each start_services call now
    sets update_ok=0 on 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 upgrade was the only apt call
    in the script without DEBIAN_FRONTEND=noninteractive, so a php.ini or httpd.conf
    question could stall an unattended run and swallow whatever was queued on stdin
  • Linux paid about 420ms for brew --version on every run: the Homebrew probe ran
    unconditionally, including on apt systems. Now gated on USE_APT == 0; interactive
    status on 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.