You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors will occurs when running `composer global update` without uninstalling valet first, because the services are still installed and therefore the files cannot be removed and updated since they're in-use. The batch script is to emergency stop and uninstall the services, and so a subsequent composer update is able to work.
- Added the .bat file to stop and uninstall services.
- Updated README to document this.
- Added a copy command in `Configuration::install` method to copy the .bat file into the /.config/valet directory for safe keeping.
@@ -334,6 +334,12 @@ This completely stops and uninstalls all of Valet's services.
334
334
335
335
You will also need to `uninstall` Valet if you are wanting to update Valet via Composer (`composer global update ycodetech/valet-windows`), just to make sure Composer can remove and update relevant files without error.
336
336
337
+
> [!CAUTION]
338
+
>
339
+
> If `composer global update` is ran before valet is uninstalled, then several running services may prevent composer from removing the files and updating valet.
340
+
>
341
+
> If this happens you can use the `emergency_uninstall_services.bat` file to stop and uninstall the services. See [Emergency Stop and Uninstall Services](#emergency-stop-and-uninstall-services) section.
342
+
337
343
###### --force
338
344
339
345
`--force` is to optionally force an uninstallation without Valet asking confirmation.
@@ -1464,6 +1470,20 @@ Doesn't affect valet functionality.
1464
1470
- cross = ✗
1465
1471
-->
1466
1472
1473
+
## Emergency Stop and Uninstall Services
1474
+
1475
+
As of v3.1.6, Valet has an emergency stop and uninstall services script. This script is copied to the `/.config/valet` directory for safe keeping.
1476
+
1477
+
So if `composer global update` is ran before valet is uninstalled, and several running services prevent composer from removing the files and updating valet, then you can run the `emergency_uninstall_services.bat` file to stop and uninstall the services.
1478
+
1479
+
To run, open a CMD terminal with Admin privileges and run this:
All services will have been stopped and you can then be able to run `composer global update`.
1486
+
1467
1487
## Known Issues
1468
1488
1469
1489
- WSL2 distros fail because of Acrylic DNS Proxy ([microsoft/wsl#4929](https://github.com/microsoft/WSL/issues/4929)). Use `valet stop`, start WSL2 then `valet start`.
@@ -1491,7 +1511,7 @@ Doesn't affect valet functionality.
1491
1511
1492
1512
> [!NOTE]
1493
1513
>
1494
-
> Make sure you uninstall Valet before `composer global update`, to make sure all services have been stopped and uninstalled before composer removes and updates them.
1514
+
> Make sure you uninstall Valet before `composer global update`, to make sure all services have been stopped and uninstalled before composer removes and updates them. Otherwise errors occur and composer can't update in-use files. If this does happen please refer to the [Emergency Stop and Uninstall Services](#emergency-stop-and-uninstall-services) section.
1495
1515
1496
1516
- If you're using a framework that uses a .env file and sets the domain name, such as `WP_HOME` for Laravel Bedrock, then make sure the TLD is the same as the one set for Valet. Otherwise, when trying to reach a site, the site will auto redirect to use the TLD in set in the .env.
0 commit comments