Skip to content

Releases

2.1.4 — Config file reliability

Choose a tag to compare

@FernandoEbert FernandoEbert released this 12 Nov 14:35
faae9af

Config file reliability

Fixes a case where ~/.config/valet/config.json could be left empty, after which every valet command (including valet update) failed with:

PHP Fatal error: Uncaught TypeError: Valet\Configuration::read(): Return value must be of type array, null returned

Valet rewrote config.json on every command, truncating it before writing. If the process was interrupted in between (killed by a timeout, crash, full disk), the file was left with 0 bytes (#14).

Change Description
Atomic writes config.json is written to a temporary file, flushed to disk and renamed over the original. An interrupted write keeps the previous file intact. Symlinks are followed and the file mode is preserved.
No-op prune Commands no longer rewrite config.json unless a parked path was actually removed. Read-only commands such as valet state don't touch the disk anymore, which matters for tools that poll Valet.
Clear error An empty or invalid config.json now prints which file is broken and how to recover, and exits with status 1, instead of a stack trace.

Other changes

  • Filesystem::putAtomic() / putAtomicAsUser()
  • ConfigurationException
  • 8 new tests

Recovering an empty config.json

If you already hit the error, recreate the file before upgrading. See Troubleshooting.

Upgrading

composer global update fernandoebert/valet-linux-plus

2.1.3 — Environment snapshot

Choose a tag to compare

@FernandoEbert FernandoEbert released this 11 Nov 18:07
924586c

Environment snapshot: valet state

A single command to see the whole Valet environment: services, PHP versions and every served site (#11).

Command Description
valet state Human-readable tables: domain, global and CLI PHP, services status and all sites (parked, linked and proxies) with type, effective PHP, SSL and path.
valet state --json Machine-readable snapshot for scripts and GUIs. Runs without sudo.

The JSON payload is versioned (schema_version: 1) and includes:

  • domain, port, https_port and Valet home
  • php: global version, CLI (path, resolved binary, version), fallback_binary and installed versions
  • paths: parked directories
  • sites: name, domain, url, path, type (parked / linked / proxy), secure, php (effective: isolated → .valetphprc → global), isolated_php, phprc_php, custom_nginx, proxy_host
  • services: nginx, dnsmasq, each PHP-FPM in use, mysql/mariadb, redis and mailpit, with active as true, false or null (not installed)
valet state --json | jq '.sites[] | {url, php, type}'
valet state --json | jq '.services[] | select(.active == false)'

This is the foundation for the upcoming desktop UI. Existing commands are unchanged.

Other changes

  • ServiceManager::isActive(): non-interactive service status check for systemd and SysV service
  • 5 new tests

Upgrading

composer global update fernandoebert/valet-linux-plus

2.1.2 — Per-project Nginx config

Choose a tag to compare

@FernandoEbert FernandoEbert released this 11 Nov 05:46
80ce7cf

Per-project Nginx config override

A site can now ship its own Nginx server block inside the project (<project>/nginx/<site>.<tld>.conf) instead of editing the file Valet generates in ~/.config/valet/Nginx. Previously, any valet secure|unsecure|isolate|unisolate|domain|install regenerated the site config and discarded manual changes (#8).

Command Description
valet nginx:publish [site] [--force] Publishes Valet's default config for the current site state (plain, secured, isolated or both) into <project>/nginx/<site>.conf, keeping the VALET_* placeholders. Refuses to overwrite without --force.
valet nginx [site] Activates the project config: renders placeholders, writes the site config, validates with nginx -t (rolls back on failure) and restarts Nginx.
valet nginx:reset [site] Deactivates the project config and restores Valet's default (keeps isolation). The project file is kept.

All commands default to the current directory. Once active, the project template is re-rendered automatically on secure, unsecure, isolate, unisolate, domain and install, and valet isolated / which-php keep working.

Available placeholders: VALET_SITE, VALET_PROJECT_PATH, VALET_HOME_PATH, VALET_SERVER_PATH, VALET_STATIC_PREFIX, VALET_CERT, VALET_KEY, VALET_FPM_SOCKET_FILE, VALET_ISOLATED_PHP_VERSION, VALET_HTTP_PORT, VALET_HTTPS_PORT, VALET_REDIRECT_PORT.

Sites without an active project config behave exactly as before.

Known limitations

  • The template name includes the TLD: after valet domain, the rendered config is kept, but valet nginx will look for <site>.<new-tld>.conf.
  • nginx -t validates the whole Nginx config, so a broken config from another site also triggers the rollback.

Other changes

Upgrading

composer global update fernandoebert/valet-linux-plus
valet install

2.1.1 — New 404 page

Choose a tag to compare

@FernandoEbert FernandoEbert released this 11 Nov 03:48
e1f2e78

New 404 page

The Valet 404 page was a plain 404 - Not Found shown for three different situations. It now has a redesigned layout (inline CSS, no external assets) and a message that explains why the request failed (#5):

  • Site not found: the host is not linked or parked. Shows valet link {name} / valet park instructions.
  • No driver matched: the site exists but no driver handles it. Shows the resolved site path and tips: check valet links, the entry point, or add a LocalValetDriver.php / ~/.config/valet/Drivers driver.
  • Page not found: a regular "Page not found" for the requested URL.

Host, URI and site path are escaped, and server.php stays compatible with older PHP versions used by isolated sites.

Other changes

  • Pre-commit hooks for code style and tests (#6)
  • Unit tests for 404 reason normalization (#5)

Upgrading

composer global update fernandoebert/valet-linux-plus
valet install

2.1.0 — Independent fork

Choose a tag to compare

@FernandoEbert FernandoEbert released this 10 Nov 21:34
6bd9c9c

Independent fork

Starting with this release, valet-linux-plus is maintained as an independent fork at FernandoEbert/valet-linux-plus, published on Packagist as fernandoebert/valet-linux-plus.

The original project (genesisweb/valet-linux-plus) has been unmaintained for about 10 months. This fork no longer tracks or contributes back to the original repository: future fixes and features are released here only.

Changes

  • Composer package renamed to fernandoebert/valet-linux-plus (#1)
  • valet update / valet is-latest now check releases of this fork (#1)
  • Declared conflict with genesisweb/valet-linux-plus, since both ship the same valet binary (#1)
  • README and SECURITY policy updated for the fork (#1)
  • CI now runs on pushes to master and tags, on ubuntu-24.04, with actions/checkout@v7 (Node.js 24) (#2, #3)

Migrating from genesisweb/valet-linux-plus

composer global remove genesisweb/valet-linux-plus
composer global require fernandoebert/valet-linux-plus
valet install

Your ~/.valet configuration (parked paths, links, certificates, isolated PHP versions) is preserved. Sites are unavailable between remove and valet install, which regenerates the nginx config and the /usr/local/bin/valet symlink.