[Bug]: Windows herd loopback command causes PHP warning
Platform
Windows
Operating system version
Windows 11 Pro (22631.3880)
System architecture
Intel (x86)
Herd Version
1.9.0
PHP Version
No response
Bug description
This error weirdly only shows when running the loopback command if the current loopback is set to 127.0.0.1 Looks like the error is related to some mac paths that haven't been converted to Windows?
Steps to reproduce
- Run
herd loopback 127.0.0.1this usually doesn't cause the error but is needed to set up for error replication - Run
herd loopback 0.0.0.0 - See the error below
Relevant log output
PS C:\Users\user> herd loopback 0.0.0.0
[0.0.0.0] loopback interface alias added.
PHP Warning: file_put_contents(/Library/LaunchDaemons/com.laravel.valet.loopback.plist): Failed to open stream: No such file or directory in phar://C:/Users/user/.config/herd/bin/herd.phar/cli/Valet/Filesystem.php on line 92
Warning: file_put_contents(/Library/LaunchDaemons/com.laravel.valet.loopback.plist): Failed to open stream: No such file or directory in phar://C:/Users/user/.config/herd/bin/herd.phar/cli/Valet/Filesystem.php on line 92
[/Library/LaunchDaemons/com.laravel.valet.loopback.plist] persistent loopback interface alias launch daemon added.
Restarting PHP 8.3...
Restarting NGINX...
Your Herd loopback address has been updated to [0.0.0.0]
Thanks for the info! Indeed, the loopback command was not implemented for the Windows version yet.
Can you share your use case for it so we can see if it makes sense to implement it and how?
Thanks for the info! Indeed, the
loopbackcommand was not implemented for the Windows version yet. Can you share your use case for it so we can see if it makes sense to implement it and how?
I believe the loopback command (or performing the same steps manually) is necessary to be able to share Herd sites with other devices on your network? My personal use case was to be able to open a website on my phone and tablet to test full responsiveness. I know I can do that with expose or ngrok but those don't work with Vite atm
Even the official Valet documentation no longer mentions the loopback command, so I'll close this issue.
If you want to share your sites locally, follow the steps mentioned in the Valet documentation:
https://laravel.com/docs/11.x/valet#sharing-sites-on-your-local-network
We will also add a section to our internal docs to explain this 👍