feat(laravel): add setting to override the php command (#14146)

Aliases always ran `php artisan`, so users of Laravel Herd (`herd php`)
or a versioned binary (`php8.4`) couldn't use them. The new
`zstyle ':omz:plugins:laravel' php` setting replaces `php` in every
alias; without it the aliases are unchanged.
This commit is contained in:
Ken van der Eerden
2026-10-09 07:11:17 -07:00
committed by GitHub
parent 2d833b453d
commit 42a4ccb1b1
2 changed files with 59 additions and 39 deletions
+15
View File
@@ -6,6 +6,21 @@ This plugin adds aliases and autocompletion for Laravel [Artisan](https://larave
plugins=(... laravel)
```
## Settings
By default the aliases run `php artisan`. To use a different PHP command, such as
`herd php` (which runs the PHP version the [Laravel Herd](https://herd.laravel.com) site
is isolated to, instead of Herd's global version) or a specific version like `php8.4`,
set this before Oh My Zsh is sourced:
```zsh
zstyle ':omz:plugins:laravel' php 'herd php'
```
`php` in the aliases below is then replaced with that command.
## Aliases
| Alias | Description |
|:-:|:-:|
| `artisan` | `php artisan` |