beyondcode / beyondcode/herd-community

[Bug]: Laravel installer update prompt creates infinite loop on Windows

Open
#1,677 0 comments 0 reactions 0 assignees View on GitHub
windows
Dominant language
No language data
Stars
122
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Herd Version

Latest (Windows, April 2026)

### Laravel Installer Version

Bundled: 5.24.4 (laravel.phar)
Global composer: 5.25.2

### Description

When running `laravel new` via Herd on Windows, the bundled `laravel.phar` (v5.24.4) detects that v5.25.2 is available and prompts to update. Accepting the update runs `composer global require laravel/installer` which updates the global composer copy to 5.25.2, but the bundled phar file remains at 5.24.4. On the next run, it detects the same version mismatch and prompts again, creating an infinite loop.

### Steps to Reproduce

1. Have Herd installed on Windows with bundled Laravel installer 5.24.4
2. Run `laravel new myapp --livewire`
3. Installer shows: "A new version of the Laravel installer is available. You have version 5.24.4 installed, the latest version is 5.25.2."
4. Select "yes" to update
5. Composer global updates to 5.25.2 successfully
6. Run `laravel new myapp --livewire` again
7. Same prompt appears because the phar is still 5.24.4
8. Loop continues indefinitely - must Ctrl+C to exit

### Root Cause

Herd's `laravel.bat` runs `php laravel.phar` (a bundled binary). The update process runs `composer global require laravel/installer` which updates a separate copy at `C:\Users\\AppData\Roaming\Composer\vendor\bin\laravel`. The phar file at `C:\Users\\.config\herd\bin\laravel.phar` is never replaced, so the version check always sees 5.24.4.

### Workaround

Update the Laravel installer via the Herd desktop app (Settings > Update), which correctly replaces the phar file. Alternatively, bypass the phar and use the global composer version directly:

```
php C:\Users\\AppData\Roaming\Composer\vendor\bin\laravel new myapp
```

### Expected Behavior

Either:
- The phar should update itself when the user accepts the update prompt
- Or the update prompt should not appear when running from a bundled phar (since composer global can't update it)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.