Skip to content

Commit 1669a75

Browse files
authored
Release/3.3.0 (#29)
This v3.3.0 release is a big PR that focuses on code-parity with macOS Valet, enhanced emergency uninstallation, significant code quality improvements and lots of refactoring for improved maintainability. Valet will also no longer ship with the executable for Acrylic, instead the latest version is dynamically downloaded and installed from SourceForge. Here are some notable changes: ### New Features - Added new http 500 error page to help users debug nginx errors that fail silently. - Added new `Packages\Package` and `Packages\Acrylic` classes for better maintainability and usability. - Added `Ansicon` to the emergency uninstall services script to help cases where Ansicon fails to uninstall properly via `valet uninstall`, which leaves it's path in the registry, and upon reinstalling valet, the `"The system cannot find the path specified"` error then fails the installation process. This is a workaround and not a direct fix for issue #28. Also improved the UX of the script. - Many code-parity changes, additions, and fixes with the Mac version (v4.8.7). Including moving the drivers into the PSR-4 autoloaded `Valet` directory and namespacing them as `Valet\Drivers` or `Valet\Drivers\Specific`. Also introduced new legacy drivers to extend the namespaced drivers so user custom drivers will still work. ### Removals - Removed all the bin files for Acrylic, in favour of downloading the latest versions from SourceForge. - Removed the redundant `CommandLine::runAsUser`, `Valet::composerGlobalDiagnose`, `Valet::composerGlobalUpdate`, and `ValetException::githubApiRateLimitExceededError` methods. ### Deprecations - The new legacy drivers are all deprecated by default and will be removed in v4.0.0. ### Fixes - Fixed the coping of Unicode characters in the `Diagnose` output. - Fixed errors when the Valet home directory (`~/.config/valet`) doesn't exist during the `Upgrader` run. `Upgrader` now only runs if the home path exists. - Fixed `Upgrader::upgradeSymbolicLinks` method running when the directory is empty causing redundant console messages. It now only runs when the config key is missing and there are symlinks in the directory. - Fixed system compatibility check to PHP 7.4 as a minimum. - Fixed `set-ngrok-token` command errors that was caused by a method name change. It now uses the `Ngrok::getConfig` instead of the old `Ngrok::getNgrokConfig`. - Fixed updating old isolated site conf files on `valet install`. Secured site conf files have always been updated on installing valet, but isolated sites were stuck using old configs. All files are now rewritten to use the updated conf structure. - Fixed `Site::unisolate` and `Site::isolate` methods to not output info directly to the terminal, as this causes progress bars to mess up. The output is now moved to the commands that called the methods.
2 parents 6563883 + 763ffac commit 1669a75

File tree

129 files changed

+3620
-3513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+3620
-3513
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ root = true
22

33
[*]
44
charset = utf-8
5-
end_of_line = lf
5+
end_of_line = crlf
66
insert_final_newline = true
77
indent_style = tab
88
indent_size = 4

.prettierrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"semi": true,
55
"printWidth": 150,
66
"bracketSameLine": true,
7-
"bracketSpacing": false
7+
"bracketSpacing": false,
8+
"endOfLine": "crlf"
89
}

CHANGELOG.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,100 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/yCodeTech/valet-windows/tree/master)
99

10+
## [3.3.0](https://github.com/yCodeTech/valet-windows/tree/v3.3.0) - 2025-10-22
11+
12+
This is a large [Release PR](https://github.com/yCodeTech/valet-windows/pull/29) that focuses on code-parity with macOS Valet, enhanced emergency uninstallation, significant code quality improvements and lots of refactoring for improved maintainability. Valet will also no longer ship with the executable for Acrylic, instead the latest version is dynamically downloaded and installed from SourceForge.
13+
14+
For the full changelog please view the PR commits.
15+
16+
### Added
17+
18+
- Added the ability for nginx to display http status 500 error page. This is important because if a PHP error occurs internally while trying to access a site, nginx fails silently, and the browser just displays a generic 500 error page. To help users debug the error, and narrow down the cause of the error, the new valet 500 error page will tell users where to look for the error in the logs.
19+
20+
- Added a command to the `Diagnose` class to get the `winsw` version via reading it's README.
21+
22+
- Added the ability to get the structure of both Valet's home directory and the Valet bin directory and output it in the `Diagnose` output as a directory tree diagram. This will help diagnose any issues in the future by making sure the Valet home directory and Valet bin directory has all the required files and named correctly. A new `Filesystem::scanDirRecursive` method has also been added to assist with scanning and retrieving of the directories and files.
23+
24+
- Added the ability to download the latest version of `Acrylic`.
25+
26+
- Added new `Acrylic` class with the namespace `Valet\Packages` that extend the new base `Package` class. This class will download the latest version from SourceForge.
27+
28+
- Added new `Acrylic_IPv4_Binding_Address.ini` stub file to add the custom IPv4 binding localhost loopback address as fixed in PR [#15](https://github.com/yCodeTech/valet-windows/pull/15).
29+
30+
- Added a `changeLocalIpv4BindingAddress` method to replace the default value of `LocalIPv4BindingAddress` with our custom value from the new stub file.
31+
32+
### Changed
33+
34+
- Extract much of `GithubPackage` class into a new `Package` class as the new base class, refactor and make the method and variable names generic.
35+
36+
- Improved the emergency uninstall services creation during Valet installation. The emergency uninstall files are now located in `~/.config/valet/Emergency Uninstall`.
37+
38+
- Fixed the script to automatically run with admin privileges if it doesn't already have them.
39+
40+
- Added `Ansicon` to the script to handle cases where `Ansicon` fails to uninstall properly.
41+
42+
In cases where valet has uninstalled for a composer update, there is sometimes a remnants of the Ansicon path in the registry. This will cause installation issues where a system message will appear `"The system cannot find the path specified"` or similar, and installation will fail. This emergency script has a copy of Ansicon in the `~/.config/valet/Emergency Uninstall` directory and will attempt to uninstall it again. This is just a workaround, and not a direct fix for issue [#28](https://github.com/yCodeTech/valet-windows/issues/28).
43+
44+
- Fixed the script to remove all the `valet\Services` files after uninstalling them.
45+
46+
- Code-parity with the Mac version (v4.8.7):
47+
48+
- Moved the basic and laravel drivers into a new `Drivers` directory within the `Valet` directory, and namespaced them as `Valet\Drivers`.
49+
50+
Moved the rest of the drivers into the `Specific` subdirectory of `Drivers`, and namespaced them as `Valet\Drivers\Specific`.
51+
52+
This is so they can be autoloaded by PSR-4.
53+
54+
- Introduced empty legacy driver classes that extend the namespaced drivers so that user custom drivers still work. These legacy drivers are deprecated by default.
55+
56+
- Added the requirement for custom drivers to be namespaced as `Valet\Drivers\Custom`.
57+
58+
- Added a more robust check for `Bedrock` environments and checking the composer dependencies for the required package.
59+
60+
- Fixed Drupal JSON:API support for non-standard urls. More info on the Valet for Mac PR [#1218](https://github.com/laravel/valet/pull/1218).
61+
62+
- Added new drivers for `Nette`, `Radicle`, and `Statamic V2`.
63+
64+
- Fixed `Craft` driver to prevent sites breaking when applying security patches to Craft. More info on the Valet for Mac PR [#1516](https://github.com/laravel/valet/pull/1516).
65+
66+
- Gracefully handle the old `SampleValetDriver.php` and upgrade it to the new namespaced sample via a new `Upgrader::fixOldSampleValetDriver` method.
67+
68+
- Added upgrade instructions for custom drivers in [UPGRADE.md](/UPGRADE.md), including namespace and inheritance requirements.
69+
70+
- Update logos to support GitHub dark/light theme.
71+
72+
- Moved the `services` command from being an installed-only command to being available without installation.
73+
74+
- Various refactoring for better organisation, maintainability, and improved code quality.
75+
76+
### Fixed
77+
78+
- Fixed the copying of Unicode character in the `Diagnose` output. The Windows clip.exe program doesn't support copying of all Unicode characters, so if there's a character it doesn't know, it will display `????` in the output instead of the character. This is especially true for the box characters (eg. `┣━`) used for directory trees. The `copyToClipboard` method now writes the output to a temp file as UTF-8 with BOM encoding to allow usage of copyable Unicode characters, and uses the Powershell command `Set-Clipboard` to copy to the clipboard.
79+
80+
- Fixed errors when the Valet home directory (`~/.config/valet`) doesn't exist during the `Upgrader` run. `Upgrader` now only runs if the home path exists.
81+
82+
- Fixed `Upgrader::upgradeSymbolicLinks` method running when the directory is empty causing redundant console messages. It now only runs when the config key is missing and there are symlinks in the directory.
83+
84+
- Fixed system compatibility check to PHP 7.4 as a minimum.
85+
86+
- Fixed `set-ngrok-token` command errors that was caused by a method name change. The `Ngrok::getNgrokConfig` method was changed to the generic `Ngrok::getConfig` in the release PR of v3.2.0 and specifically in commit [db085bd](https://github.com/yCodeTech/valet-windows/commit/db085bd1ddb0be1d58a6b59b33acae5ee1050924), but it's usage in the command was never changed. Changed the method call to the new name.
87+
88+
- Fixed updating old isolated site conf files on `valet install`. Secured site conf files have always been updated on installing valet via the `Nginx::rewriteSecureNginxFiles` method, but isolated sites were stuck using old configurations. All conf files are now rewritten and updated to prevent old nginx configurations causing issues.
89+
90+
- Fixed `Site::unisolate` and `Site::isolate` methods to not output info directly to the terminal, as this causes progress bars to mess up in the terminal when using the `Site::reisolateForNewTld` method which calls the `un/isolate` methods. The info output is now moved to the commands that called the methods.
91+
92+
### Removed
93+
94+
- Removed the `CommandLine::runAsUser` method because it is a duplicate method of `run`. It doesn't do anything different or special. So we can just use `run` instead.
95+
96+
- Removed the unused `Valet::composerGlobalDiagnose`, `Valet::composerGlobalUpdate`, and `ValetException::githubApiRateLimitExceededError` methods.
97+
98+
- Removed all bin files for `Acrylic`, in favour of downloading the latest versions from SourceForge.
99+
100+
### Deprecated
101+
102+
- The new legacy drivers are all deprecated by default and will be removed in v4.0.0.
103+
10104
## [3.2.1](https://github.com/yCodeTech/valet-windows/tree/v3.2.1) - 2025-08-03
11105

12106
### Added

README.md

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<p align="center"><img src="./laravel_valet_windows_3_logo.svg" style="width:500px; background: none;"></p>
1+
<p align="center"><img src="./art/laravel_valet_windows_3_logo.svg" style="width:500px; background: none;"></p>
22

33
<p align="center">
44
<a href="https://packagist.org/packages/ycodetech/valet-windows"><img src="https://poser.pugx.org/ycodetech/valet-windows/downloads" alt="Total Downloads"></a>
@@ -10,7 +10,7 @@
1010
<p align="center">This is a Windows port of the popular Mac development environment <a href="https://github.com/laravel/valet">Laravel Valet</a>.</p>
1111
<p align="center">Laravel Valet <i>Windows</i> 3 is a much needed updated fork of <a href="https://github.com/cretueusebiu/valet-windows">cretueusebiu/valet-windows</a>, with lots of improvements and new commands. This version hopes to achieve as much parity as possible with the Mac version. For command parity, please refer to the <a href="#command-parity-checker">parity checker</a>.</p>
1212

13-
<p align="center"><img src="./composer_laravel_valet_windows_3_logo.svg" style="width:400px; background: none;"></p>
13+
<p align="center"><img src="./art/composer_laravel_valet_windows_3_logo.svg" style="width:400px; background: none;"></p>
1414

1515
```sh
1616
composer global require ycodetech/valet-windows
@@ -152,10 +152,9 @@ This is 3.0 of Valet Windows, branded under the name _Laravel Valet Windows 3_,
152152

153153
Valet ships with and installs these services:
154154

155-
| Service | Version |
156-
| ----------------------------------------------------------------------------: | ------- |
157-
| [Acrylic DNS Proxy](https://mayakron.altervista.org/support/acrylic/Home.htm) | 2.1.0 |
158-
| [ngrok](https://ngrok.com/) | 3.3.1 |
155+
| Service | Version |
156+
| --------------------------: | ------- |
157+
| [ngrok](https://ngrok.com/) | 3.3.1 |
159158

160159
> [!IMPORTANT]
161160
> ngrok may error out that it is "too old" when running it for some accounts. In the upcoming v3.2.0 release, Valet will ship with the latest version of ngrok.
@@ -166,14 +165,15 @@ Valet ships with and installs these services:
166165
>
167166
> For both commands, valet automatically appends the config file location as a flag to the command, so ngrok will already know where the config file is.
168167
169-
As of v3.2.0, Valet no longer ships with the executables for the following services, instead they will be downloaded and installed automatically from GitHub's API. This is so that the latest versions with bug fixes and security updates can be installed.
168+
As of v3.2.0 and v3.3.0, Valet no longer ships with the executables for the following services, instead they will be downloaded and installed automatically from it's online source (GitHub, SourceForge, etc.). This is so that the latest versions with bug fixes and security updates can be installed.
170169

171-
| Service | Latest Version as of 13/05/2025 |
172-
| ------------------------------------------: | ------------------------------- |
173-
| [Ansicon](https://github.com/adoxa/ansicon) | 1.89 |
174-
| [gsudo](https://github.com/gerardog/gsudo) | 2.6.0 |
175-
| [nginx](https://nginx.org/) | 1.28.0 |
176-
| [WinSW](https://github.com/winsw/winsw) | 2.12.0 |
170+
| Service | Latest Version as of 2025-10-22 |
171+
| ----------------------------------------------------------------------------: | ------------------------------- |
172+
| [Ansicon](https://github.com/adoxa/ansicon) | 1.89 |
173+
| [gsudo](https://github.com/gerardog/gsudo) | 2.6.1 |
174+
| [nginx](https://nginx.org/) | 1.29.2 |
175+
| [WinSW](https://github.com/winsw/winsw) | 2.12.0 |
176+
| [Acrylic DNS Proxy](https://mayakron.altervista.org/support/acrylic/Home.htm) | 2.2.1 |
177177

178178
> [!IMPORTANT]
179179
>
@@ -205,7 +205,7 @@ Also make sure to open your preferred terminal (Windows Terminal, CMD, Git Bash,
205205

206206
- Install Valet with Composer via `composer global require ycodetech/valet-windows`.
207207

208-
<p align="center"><img src="./composer_laravel_valet_windows_3_logo.svg" style="width:400px; background: none;"></p>
208+
<p align="center"><img src="./art/composer_laravel_valet_windows_3_logo.svg" style="width:400px; background: none;"></p>
209209

210210
> [!WARNING]
211211
>
@@ -1537,17 +1537,25 @@ Doesn't affect valet functionality.
15371537
15381538
## Emergency Stop and Uninstall Services
15391539
1540-
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.
1540+
As of v3.1.6, Valet has an emergency stop and uninstall services script. This script is copied to the `/.config/valet/Emergency Uninstall` directory for safe keeping.
15411541
15421542
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.
15431543
15441544
To run, open a CMD terminal with Admin privileges and run this:
15451545
15461546
```sh
1547-
> %UserProfile%\.config\valet\emergency_uninstall_services.bat
1547+
> "%UserProfile%\.config\valet\Emergency Uninstall\emergency_uninstall_services.bat"
15481548
```
15491549

1550-
All services will have been stopped and you can then be able to run `composer global update`.
1550+
Alternatively, find it in the File Explorer and double clicking the file will also run it.
1551+
1552+
All services will have been stopped and removed and you can then be able to run `composer global update`.
1553+
1554+
> [!IMPORTANT]
1555+
>
1556+
> If you receive the `The system cannot find the path specified` error or similar while installing valet, then usually it's to do with Ansicon leaving it's path in the registry after uninstalling, which then fails Valet's installation.
1557+
>
1558+
> The emergency uninstall script can help to uninstall Ansicon again and hopefully fully removing it from the registry.
15511559
15521560
## Valet Directories
15531561

@@ -1595,7 +1603,13 @@ Upon installation, Valet creates the following directories and config files:
15951603
- `~/.config/valet/config.json`
15961604
This is the main Valet config file.
15971605

1598-
- `~/.config/valet/emergency_uninstall_services.bat`
1606+
- `~/.config/valet/Emergency Uninstall`
1607+
Contains the emergency uninstall files.
1608+
1609+
- `~/.config/valet/Emergency Uninstall/ansicon`
1610+
Contains the Ansicon files and executable to help uninstall it.
1611+
1612+
- `~/.config/valet/Emergency Uninstall/emergency_uninstall_services.bat`
15991613
This is an batch file to do an emergency stop and uninstall of all services. See the [Emergency Stop and Uninstall Services section](#emergency-stop-and-uninstall-services).
16001614

16011615
> [!WARNING]
@@ -1655,6 +1669,12 @@ Upon installation, Valet creates the following directories and config files:
16551669

16561670
If the WMI error does occur, try running the command again. If different WMI errors occur, please submit an issue with all relevant details.
16571671

1672+
- If there is a large error and it's file trace output to the terminal, the top of the error may be cut off/overwritten. Apparently Symfony can only write to the terminal that is viewable, if it goes outside of the viewable area (ie. you need to scroll up to view) then the output is overwritten and the most important part of the error, the description at the start is cut off. (See https://github.com/symfony/symfony/issues/35012). If this happens, make the terminal larger in height and try the command again to try and view the full error.
1673+
1674+
- When trying to install Valet after updating via Composer, and you receive this error or similiar: `The system cannot find the path specified`; it could be that Ansicon hasn't uninstalled properly and left it's path in the registry. Because it happens unpredictably, there is no way of debugging or fixing it.
1675+
1676+
The only "workaround" is to use the emergency uninstall script (`emergency_uninstall_services.bat`) in the `~/.config/valet/Emergency Uninstall` directory to allow Ansicon another chance to uninstall itself properly. (See [issue 28](https://github.com/yCodeTech/valet-windows/issues/28)). See the [Emergency Stop and Uninstall Services section](#emergency-stop-and-uninstall-services).
1677+
16581678
## Xdebug Installation
16591679

16601680
Valet only installs a specific Xdebug PHP CGI service on a separate port to work alongside the PHP service. To install Xdebug itself, follow the [official guide](https://xdebug.org/docs/install).

UPGRADE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Upgrading
2+
3+
- If you have any issues with your drivers, all custom drivers (including the `SampleValetDriver` published by previous versions of Valet) must have the following:
4+
5+
- Have the namespace of `Valet\Drivers\Custom`.
6+
7+
- Extend the new namespaced drivers instead of the old non-namespaced drivers by specifying a `use` keyword like `use Valet\Drivers\ValetDriver;`
8+
9+
See the [new SampleValetDriver](https://github.com/yCodeTech/valet-windows/blob/master/cli/stubs/SampleValetDriver.php) for an example.

0 commit comments

Comments
 (0)