All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
3.4.1 - 2026-04-11
- Fixed #42: replacing PHP ports in site configs removes the entire
set $valet_site_php_portline and malforms the config; in #43.
- Removed the limit of max replacements the PHP port replacement can do, ensuring all PHP port lines in multiple location blocks in the site configs are replaced; in #43.
3.4.0 - 2026-04-09
-
Added ability for the nginx error pages to be disabled. Fixes #31 in PR #34.
This ensures that valet doesn't interfere with framework error pages (eg. Laravel, Symfony, etc.).
-
Added new
nginx_error_pageconfig key (defaulton) to control the visibility of the error pages. -
Added new
nginx-error-pageCLI command to display or update the visibility of the error pages via thenginx_error_pageconfig key. -
Updated the
UpgraderandConfigurationto handle the new config key and upgrade it if it's missing from existing configs.
-
-
Fixed legacy drivers path in the
require-drivers.phpfile in PR #32, which was wrongly changed in PR #29 (commit 8a94888), so the legacy drivers wouldn't load, and PHP would output a "No such file or directory" error. Subsequently resolves #38. -
Fixed replacing php port on re-isolation of already isolated sites in PR #33 and #36.
On non-isolated sites that are being isolated, the replacement of the
$valet_php_portvariable to the actual port number works fine. But if an already isolated site was to be reisolated to a different php version, then the port wouldn't be changed because the$valet_php_portis no longer there, as it's the current port number instead. Thus making the isolation null and void and the site will still be served on the original isolated php version on the original port.-
Fixed by using a new
valet_site_php_portvariable in the nginx config stub files to represent the php port for isolated sites, instead of directly referencing thevalet_php_portvariable, allowing for per-site PHP port overrides. Thevalet_site_php_portvariable will be set to the port number on isolation, and when not isolated it will be reference thevalet_php_portglobal variable for the default PHP version. This allows the correct replacement of the php port on isolation and re-isolation of sites. -
Added new
Upgradermethod (upgradeNginxSitePhpPortOverrides) to upgrade existing Nginx site nginx configs to use the newvalet_site_php_portvariable, which only reisolates, resecures, and reproxies all sites to apply the changes via using the updated stub files.
This is a one time upgrade and once complete, an
php_port_overrides_upgradedkey will be added to valet's config file so that it won't upgrade again. -
-
Fixed upgrading secured proxy sites with the wrong config via
Upgrader::upgradeNginxSiteConfigsbecause it found a SSL certificate for the site and thought it was a normal secured site, so it lost it's proxy. In PR #35. -
Fixed proxy URL handling bugs in
Site::proxyDeletein PR #35.-
The TLD check was incorrectly applied to the entire URL string (if multiple sites were specified) instead of each individual proxy URL. This was because it used the old variable (
$urlinstead of the correct$proxyUrl). Fixed the erroneous variable to use the correct one. -
The
$protocolvariable was alwaysundefinedas it was being set inside an unrelated conditional that was never equating totrue. Moved the variable out of the conditional so it gets set properly.
-
- Removed redundant
fastcgi_intercept_errors/proxy_intercept_errorsanderror_pagedirectives from site configs, since they are not used by nginx as it's only the mainvalet.confthat nginx uses these directives from. In PR #39
- Refactored
Upgrader, added better tracking for one time upgrades, and restructured upgrade keys in PR #37.-
Consolidated upgrade keys (such as
symlinks_upgradedandphp_port_overrides_upgraded) under a newupgradesarray in the configuration, with new namessymlinksandnginx_site_php_port_overrides. With new helper methodsisUpgradedandmarkAsUpgradedto access the newupgradesconfig format and improve upgrade tracking consistency. -
Added a migration method (
migrateSymlinksUpgradeKey) to move the legacysymlinks_upgradedkey to the newupgrades.symlinkskey and clean up the old key, ensuring backward compatibility and config cleanliness. This prevents the breaking change from being a breaking change.Note: The
symlinks_upgradedis the only legacy key that needs to be migrated. Thephp_port_overrides_upgradedkey wasn't released in a stable version, so it doesn't need migrating. -
Added new
Configuration::removeKeyto remove nested configuration values using Laravel'sArr::forgethelper and changedConfiguration::updateKeyto use Laravel'sArr::sethelper, allowing for dot notation and more flexible configuration removals and updates.
-
3.3.0 - 2025-10-23
This is a large Release 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.
For the full changelog please view the PR commits.
-
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.
-
Added a command to the
Diagnoseclass to get thewinswversion via reading it's README. -
Added the ability to get the structure of both Valet's home directory and the Valet bin directory and output it in the
Diagnoseoutput 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 newFilesystem::scanDirRecursivemethod has also been added to assist with scanning and retrieving of the directories and files. -
Added the ability to download the latest version of
Acrylic.-
Added new
Acrylicclass with the namespaceValet\Packagesthat extend the new basePackageclass. This class will download the latest version from SourceForge. -
Added new
Acrylic_IPv4_Binding_Address.inistub file to add the custom IPv4 binding localhost loopback address as fixed in PR #15. -
Added a
changeLocalIpv4BindingAddressmethod to replace the default value ofLocalIPv4BindingAddresswith our custom value from the new stub file.
-
-
Extract much of
GithubPackageclass into a newPackageclass as the new base class, refactor and make the method and variable names generic. -
Improved the emergency uninstall services creation during Valet installation. The emergency uninstall files are now located in
~/.config/valet/Emergency Uninstall.-
Fixed the script to automatically run with admin privileges if it doesn't already have them.
-
Added
Ansiconto the script to handle cases whereAnsiconfails to uninstall properly.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 Uninstalldirectory and will attempt to uninstall it again. This is just a workaround, and not a direct fix for issue #28. -
Fixed the script to remove all the
valet\Servicesfiles after uninstalling them.
-
-
Code-parity with the Mac version (v4.8.7):
-
Moved the basic and laravel drivers into a new
Driversdirectory within theValetdirectory, and namespaced them asValet\Drivers.Moved the rest of the drivers into the
Specificsubdirectory ofDrivers, and namespaced them asValet\Drivers\Specific.This is so they can be autoloaded by PSR-4.
-
Introduced empty legacy driver classes that extend the namespaced drivers so that user custom drivers still work. These legacy drivers are deprecated by default.
-
Added the requirement for custom drivers to be namespaced as
Valet\Drivers\Custom. -
Added a more robust check for
Bedrockenvironments and checking the composer dependencies for the required package. -
Fixed Drupal JSON:API support for non-standard urls. More info on the Valet for Mac PR #1218.
-
Added new drivers for
Nette,Radicle, andStatamic V2. -
Fixed
Craftdriver to prevent sites breaking when applying security patches to Craft. More info on the Valet for Mac PR #1516. -
Gracefully handle the old
SampleValetDriver.phpand upgrade it to the new namespaced sample via a newUpgrader::fixOldSampleValetDrivermethod. -
Added upgrade instructions for custom drivers in UPGRADE.md, including namespace and inheritance requirements.
-
Update logos to support GitHub dark/light theme.
-
-
Moved the
servicescommand from being an installed-only command to being available without installation. -
Various refactoring for better organisation, maintainability, and improved code quality.
-
Fixed the copying of Unicode character in the
Diagnoseoutput. 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. ThecopyToClipboardmethod 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 commandSet-Clipboardto copy to the clipboard. -
Fixed errors when the Valet home directory (
~/.config/valet) doesn't exist during theUpgraderrun.Upgradernow only runs if the home path exists. -
Fixed
Upgrader::upgradeSymbolicLinksmethod 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-tokencommand errors that was caused by a method name change. TheNgrok::getNgrokConfigmethod was changed to the genericNgrok::getConfigin the release PR of v3.2.0 and specifically in commit db085bd, but it's usage in the command was never changed. Changed the method call to the new name. -
Fixed updating old isolated site conf files on
valet install. Secured site conf files have always been updated on installing valet via theNginx::rewriteSecureNginxFilesmethod, but isolated sites were stuck using old configurations. All conf files are now rewritten and updated to prevent old nginx configurations causing issues. -
Fixed
Site::unisolateandSite::isolatemethods to not output info directly to the terminal, as this causes progress bars to mess up in the terminal when using theSite::reisolateForNewTldmethod which calls theun/isolatemethods. The info output is now moved to the commands that called the methods.
-
Removed the
CommandLine::runAsUsermethod because it is a duplicate method ofrun. It doesn't do anything different or special. So we can just useruninstead. -
Removed the unused
Valet::composerGlobalDiagnose,Valet::composerGlobalUpdate, andValetException::githubApiRateLimitExceededErrormethods. -
Removed all bin files for
Acrylic, in favour of downloading the latest versions from SourceForge.
- The new legacy drivers are all deprecated by default and will be removed in v4.0.0.
3.2.1 - 2025-08-03
- Added support for Laravel 12 in PR #25.
3.2.0 - 2025-05-14
This is a large Release PR that adds new php:proxy and share-tool commands, lots of refactoring for improved maintainability, dynamically downloading the latest versions of the required executables from GitHub, and brings a lot of the code inline with macOS Valet. For the full changelog please view the PR commits.
-
Removed the deprecated (since v3.1.0) confirmation question about uninstalling the outdated cretueusebiu package in the
installcommand. Doesn't affect valet functionality. -
Remove references to the defunct
xip.io, inline with macOS Valet. -
Removed unused code:
-
Filesystem::symlinkmethod in favour ofFilesystem::symlinkAsUseras the newFilesystem::symlinkmethod. -
SUDO_USERfrom theuserhelper function since Windows doesn't setSUDO_USERenvironment variable at all, so this is redundant code. -
array_is_listhelper function, which was a polyfill for the PHP 8.1 function and was introduced in commit a7312ef. But has been unused since commit e30fd4f (where the usage ofarray_is_listinaddTableSeparatorfunction was removed). So we can safely remove it. -
str_ends_withandstr_starts_withhelper functions as these will be handled by the Symfony dependency.
-
-
Removed all bin files for
gsudo,ansicon,WinSW, andnginx, in favour of downloading the latest versions from GitHub via the API.
-
Added new
php:proxycommand with the alias ofphpto proxy PHP commands through to a site's PHP executable. This is inline with macOS Valet.-
The command is defined in
valet.php, while the logic resides in thevaletscript in the project root. -
Added new
PhpCgi::getPhpPathmethod to get the PHP executable path by specifying a version. -
Changed
PhpCgi::findPhpVersionmethod to return the executable path if the newgetExecPathparam istrueotherwise it will default to returning the PHP version. Also changed it's error return value tofalsefor easier checking. -
Changed
Site::whichPhpmethod to extract the PHP version from the ansi coloured output, and the raw version string to a new element in the return array to avoid weird errors when using it in the newphp:proxycommand. -
Changed the info output in
php:whichcommand to use the new raw phpVersion string, and added a separate info output to get and display the php executable path using the newPhpCgi::getPhpPathmethod.
-
-
Added new
share-toolcommand to get or set the name of the currently selected share tool. This is inline with macOS Valet. Only supported option at the moment isngrok, which is the default tool in the config. -
Added new
ShareandShareTools\ShareToolclasses to setup the supported share tools and communicate with the share tool classes.-
Shareclass defines methods to set and get the share tools (eg.ngrok), and setup the share tool class instance to be able to chain their methods.- Added methods:
-
shareToolis the main method to use which returns the share tool's class instance to be able to access the methods in a chainable way. -
createShareToolInstanceto create the share tool child class instance. -
getShareToolInstanceto get the share tool child class instance. -
getShareToolsto get all the supported share tools as a string. -
isToolValidto check if the specified tool is valid. -
getCurrentShareToolto get the current share tool from the config.
-
- Added methods:
-
ShareTool(abstract) class with the namespaceValet\ShareToolsis the base class that all other share tool classes will extend and implement required methods, it also holds some shared methods.- Added methods:
-
start(abstract) to start sharing. A share tool class is required to implement the method since each tool could have different steps. -
run(abstract) to proxy CLI commands through to the tool's executable and run them. A share tool class is required to implement the method. -
getConfigto get the config path. A share tool class is required to implement the method. -
currentTunnelUrlto get the current tunnel URL from the API. The method was moved fromNgrok::currentTunnelUrlinto this new shared method. -
findHttpTunnelUrlto find the HTTP tunnel URL from the list of tunnels. The method was moved fromNgrok::findHttpTunnelUrlinto this new shared method.
-
- Added methods:
-
Moved
Ngrokclass into the newShareToolsnamespace, and changed it to extend the newShareToolclass. -
Renamed
Ngrok::getNgrokConfigmethod to the newNgrok::getConfigand changed all references. -
Changed the
Ngrokclass infetch-share-urlcommand for the newShareclass. -
Refactored
ShareTool::currentTunnelUrlto loop through all tunnel endpoints, which is inline with the macOS Valet. -
Changed
findHttpTunnelUrlmethod back to using the object operator, that was changed in commit 2ea79e6. Because we are no longer changing the object to an array, so we need to change it. This is more inline with macOS Valet code. -
Changed
set-ngrok-token,shareandfetch-share-urlcommands to ensure that they don't run if a share tool isn't set. Alsoset-ngrok-tokenshouldn't be able to run whenngrokis not the current share tool. This is useful for when there are more share tools to use. -
Changed
sharecommand to use the newShareclass and using theshareToolmethod to get the current share tool's class instance and access the tool'sstartmethod directly via method chaining.
-
-
Add
symfony/polyfill-php80dependency to polyfill various PHP 8.0 functions for backwards compatibility, includingstr_contains,str_starts_with, andstr_ends_with. https://github.com/symfony/polyfill/blob/1.x/src/Php80/README.md -
Added new
Upgraderclass to define methods that will run every time valet is ran.-
Removed the
Configuration::pruneandSite::pruneLinksmethod calls fromvalet.phpin favour of the new methods in this class. -
Added methods:
-
onEveryRunto call all the otherUpgradermethods so they can run on every valet run. -
prunePathsFromConfigto prune all non-existent paths from the configuration (usesConfiguration::prune). -
pruneSymbolicLinksto prune all symbolic links that no longer point to a valid site (usesSite::pruneLinks). -
upgradeSymbolicLinksto upgrade and convert all Windows junction links to real symbolic links. This is a one-time upgrade that will be run when Valet is first installed. -
lintNginxConfigsto lint the Nginx configuration files. This is just a wrapper around theNginx::lintmethod. -
upgradeNginxSiteConfigsto upgrade Nginx site configurations if they contain deprecation warnings forhttp2param andhttp2_push_preloaddirective.
-
-
Added a call to
onEveryRunmethod invalet.php.
-
-
Added new
Filesystemmethods:-
isFile, which is a wrapper around the PHPis_filefunction to check if a path is a normal file. -
convertJunctionsToSymlinksto remove the Windows junction links, and re-link the sites as real symlinks. -
getJunctionLinksto get all the site links that are junctions. -
movemethod to rename a filepath which moves it to a new location, eg.my/path/to/file.txt-->new/path/to/file.txt. The filepath can be a file or directory. If it's a directory, the contents will be moved at the same time. If the destination directory or any subdirectories does not exist, it will be created. This uses the PHPrenamefunction, and is the PHP docs recommended way for moving files:"If you wish to move a file, use the rename() function."
(Originally, PHP's
copyfunction was used in this method, but it doesn't create directories if they don't exist, causing errors.) -
unzipmethod to unzip a zip file into the specified location. -
listTopLevelZipDirsto list top-level directories in a zip file. -
getStubmethod to get the specified stub file. This is inline with macOS Valet. This gets the contents of a file from the internalstubsdirectory, but if the user has a custom stub file in astubsdirectory in the home path (~/.config/valet/stubs), then we use the custom stub instead.- Changed all references of getting a file from the
stubsdirectory to use the newgetStubmethod, which makes the code slightly DRYer as it's not constantly repeating thestubpath.
- Changed all references of getting a file from the
-
-
Added new
GithubPackageabstract class in the newPackagesdirectory with the namespaceValet\Packages. This is the base class that all other package classes will extend.-
Added methods:
-
install(abstract) to allow a package class to define theinstallmethod since each package could have different install steps. -
isInstalledto check if the package is installed (ie. the package executable exists). -
downloadto download the package files from GitHub API via Guzzle. -
packagePathto get the path to the package directory. -
packageExeto get the path to the package executable. -
cleanUpPackageDirectoryto clean up the downloaded package's directory, removing all unnecessary directories and files. -
getUnnecessaryDirsto get the unnecessary directories to remove in the package directory. -
removeZipto remove the zip file after extracting its contents. -
moveFilesto move files from the extracted directory into the main package directory. -
getVersionedFilenameto get the versioned filename from the asset name, replacing theVERSIONplaceholder with the version number obtained via regex. This is so we can get the nginx zip file which is named with it's version.
-
-
Added
packageNameproperty, so that all the package classes can define it with the package's name as value. Allowing the use of the property within theGithubPackageclass to dynamically refer to the package that the current child class is referring to. This makes methods likeisInstalled,packagePath, andpackageExeeasier to read and use, without the need for passing an arg for the package name, it just uses the dynamic property instead.
-
-
Added new
Gsudo,WinSW, andNginxclasses with the namespaceValet\Packagesthat extend theGithubPackageclass. These classes will download the latest versions from the GitHub API.-
Gsudoclass:-
Added methods:
-
installto download and install the latest version of Gsudo from GitHub releases. -
configureGsudoto configure Gsudo's settings. -
runAsSystemto run Gsudo as the Local System account. -
runAsTrustedInstallerto run Gsudo as the Trusted Installer account. Required forFilesystem::symlinkmethod.
-
-
Added a call to the
installmethod in Valet's commandsinstallandsudoto install the Gsudo package from GitHub if it's not already installed.
-
-
WinSWclass:-
Added methods:
-
installto download and install the latest version of WinSW from GitHub releases. -
changeReadmeto change the downloadedreadme.mdto:-
Add the release version to the top of the file so we can detect what version it is by reading it.
-
Replace relative links with absolute links to the source code and docs on GitHub. (For dev usage.)
-
-
-
Added a call to the
installmethod in theWinSWFactory::__constructmethod to download and install the WinSW package from GitHub if it's not already installed.
-
-
Nginxclass:-
Added methods:
-
installto download and install the latest version of Nginx from GitHub releases. -
moveNginxFilesto move the required Nginx files into the package directory. This is needed as it loops through and the zip directories, and finds the correct name of the directory needed to move.
-
-
Added a call to the
installmethod in theNginx::installmethod. So that everytime Nginx is installed, it also calls thePackages\Nginxto download and install the Nginx package from GitHub if it's not already installed.
-
-
-
Added
getTarExecutablehelper function to return the path totar.exewhich resides inC:\Windows\System32directory.This is needed because just using
taras a command might not get the correcttarsyntax if bash is installed. Bash also installs it's own global version of thetarcommand with a very different set of options. So outright specifying the Windowstarexecutable path prevents any clashes. Used inFilesystem::unzipmethod. -
Added new
str_contains_anyhelper function, to check if the string includes any of the strings in an array. There is no PHP native function equivalent to this, so it just loops through the array of needles and uses the PHP nativestr_containsfunction under the hood to check a singular string within a string. This is used in theUpgrader::upgradeNginxSiteConfigsmethod. -
Added new
ValetExceptionclass which extends the PHP nativeException, and holds various methods to help construct theExceptionerror messages.-
Added methods:
-
getErrorto construct and get the error message. The code was moved from theerrorhelper function into this new public method, with a few refactorings. This will be the method thaterrorhelper function will use to obtain the error message. -
getErrorTypeNameto get the error type name from the error code. The method was moved from thegetErrorTypeNamehelper function into this new private method. -
constructTraceto construct a better-formatted error trace. The code was moved from theerrorhelper function into its this new private method, with a few refactorings. -
githubApiRateLimitExceededErrorto handle the GitHub API "rate limit exceeded" error from theGithubPackage::downloadmethod. This gets the rate limit and limit reset time from the API response headers, and extracts the IP address from the original response error via regex. It then displays the error in the terminal with more information than the original error would have displayed. -
calculateTimeToGithubApiLimitResetto calculate the time left for GitHub API rate limit to reset when the API sends the "rate limit exceeded" error from theGithubPackage::downloadmethod. It uses the reset time from the API headers, and gets the time difference from the current time. We then get the difference in minutes and seconds, and construct a human-readable string for the error output.
-
-
Changed
errorhelper function to get the constructedValetExceptionerror message viaValetException::getErrormethod and output it to the console.
-
-
Added new
Diagnosecommands to output the version number ofgsudo,ansicon, andacrylic.Gsudo and Ansicon use the
packageExemethod of their respective package class and use their CLI commands to get the versions. But Acrylic doesn't have a CLI command, so we have to get the contents of it's Readme.txt, and find the version later on.- Added a conditional to the
editOutputmethod to edit the output of Acrylic's Readme.txt content. We use regex to find the version number within the file contents, and only output the version number.
- Added a conditional to the
-
Version bumped the macOS valet URL in the
paritycommand to make sure the command parity is up to date with the latest MINOR version at the time of release. -
Update
ngrokexecutable to v3.22.0 -
Bumped versions of composer dependencies:
composer/ca-bundleandguzzlehttp/guzzle -
Refactored the
userhelper function to have theUSERNAMEvariable return by default, and only return theUSERif it's set. -
Extracted much of
server.phpinto a newServerclass, inline with the macOS Valet; simplifying a lot of the code and renaming some methods. -
Refactored the requiring of valet driver files for simplicity by looping through the directory, instead of listing all the files to include.
-
Refactored
Filesystem::unlinkfor simplicity.-
Removed the
is_dircheck from the symlink part of the code since theunlinkandrmdirdoes both symlinked files and folders. -
Remove
file_existscheck since it was only checking for files and the code is the same as the symlink. Combine it into theisLinkcheck to also check for files with the newisFilemethod instead offile_exists. -
Refactored
isLinkmethod since we're dealing with real symlinks now instead of junctions, so the PHPis_linkfunction works as intended now.
-
-
Changed
Ansiconclass:-
Moved the class into the
Packagesdirectory under the new namespaceValet\Packages, and changed it to extend the newGithubPackageclass. -
Changed the
installmethod to download the latest version from the Github API using Guzzle and unzip the zip file before running therunOrExitinstallation code.The method also creates a
readme.mdfile with the contents of thereadme.txt, just to make it easier to read for dev purposes. -
Changed the
runOrExitcode in bothinstallanduninstallmethods to use the parent class's newpackageExemethod, which gets the executable path of the package. -
Removed the
__constructmethods from this newAnsiconclass, since it will now be using the parent's__constructmethod instead.
-
-
Changed the name of the WinSW executable from
WinSW.NET4.exeto justwinsw.exein thecopycall of theWinSW::createConfigurationmethod. This is because the executable needs to be the same name as the directory, otherwise the newGithubPackage::packagePathmethod wouldn't work. -
Changed the
CommandLine::sudomethod to use the newGsudo::runAsTrustedInstaller, andGsudo::runAsSystemmethods, instead of explicitly hardcoding the executable path and command flags in thisCommandLinemethod. This uses theresolvehelper function to setup a newGsudoclass instance and access the methods in the normal object way. -
Changed the
Nginx::lintmethod to:-
Allow it to return the output to the calling function instead of the terminal if the
returnOutputvariable istrue. -
Redirect the stderr of nginx's configuration test command to stdout so we can catch the errors in the output if returning. Ie. added
2>&1to the nginx command. -
Use the
errorhelper function to throw anExceptionand colour code the output instead of throwing aDomainExceptionby itself which has no colour output. -
Colour the output as a
warningif theoutputContentcontains the wordwarn. Otherwise, a standardoutputwill be used.
-
-
Combined redundant
COMPOSER_GLOBAL_PATHconstant into theDiagnosecommand.-
Removed the redundant
COMPOSER_GLOBAL_PATHconstant because it's only used by one thing. So it doesn't need to exist. -
Changed the
Diagnosecommand to get the contents of the globalcomposer.jsonto use the code that was originally used to set theCOMPOSER_GLOBAL_PATHconstant. Ie. The command now directly uses theValet::getComposerGlobalPathmethod to get the global composer path.
-
-
Refactored
Diagnosecommands, making them DRYer:-
For nginx to use the new
packagePathandpackageExemethod of thePackages\Nginxclass. -
That gets the contents of valet's
config.jsonto use theConfiguration::pathmethod instead of repeating it's path (~/.config/valet/config.json).
-
-
Fixed
Filesystem::symlinkAsUsermethod to:-
Create a real symbolic link instead of a Windows directory junction link.
As per the docs,
mklinkparams are/Dfor symbolic link,/Hfor hard link, and/Jfor directory junction.Previously, site links are created as a directory junction. This is not a real symbolic link, and PHP's
is_linkfunction always fails. Fixed by using the proper param/Dto create a real symlink. -
Renamed the method to
symlinksinceAsUserdoesn't make sense in this context. -
Changed how valet runs the
mklinkcommand. It now usesCommandLine::sudoto run with trusted installer privileges since the/Dparam requires trusted installer privileges not just elevated privileges. -
Fixed unwanted output from
mklinkWindows command by adding a quiet mode tosudo.
-
-
Fixed the check in
Filesystem::isBrokenLinkmethod to determine if the resolved symlinked path doesn't exist by usingfile_existsPHP function. This is becausereadlinkwill always resolve it's target path and will never return false, so it doesn't really check if it exists or not. -
Fixed
certutilrequiring elevated privileges for SSL certificates.When securing/unsecuring a site, valet uses
certutilWindows command to add/delete SSL certificates from the machine store, which requires elevated privileges. Butcertutilhas a-useroption to store the certificates in the user store instead of machine store, which doesn't require privileges. So added the option to allcertutilusages. -
Fixed
Site::isSecuredmethod that was failing due to double TLDs (.tld.tld, eg..test.test). This is easily fixed by removing the TLD if it's provided before the method continues which re-adds the TLD. -
Fixed
Site::isolateandSite::unisolatemethods from spamming theNginx::stopandNginx::restartmethods.The
Nginx::stopandNginx::restartmethods are spammed if theSite::isolateorSite::unisolatemethods are used in a loop, causing a plethora of Windows UAC popups (ifsudowasn't used).Fixed by removing the
Nginxcalls within theSitemethods and added theNginx::restartmethod call to the relevant command definitions invalet.phpafter whereSite::isolateorSite::unisolateare called. -
Fixed nginx's deprecated
http2param andhttp2_push_preloaddirective.As of nginx 1.25.1 (we're using the latest 1.28.0), the
http2_push_preloaddirective and thehttp2param of thelistendirective are deprecated. To fix we need to remove them.-
Removed the
http2param of thelistendirective in all relevant*.valet.confstub files. -
Removed the
http2_push_preloaddirective in all relevant*.valet.confstub files. -
Added the recommended
http2directive instead of the param onlisten, in all relevant*.valet.confstub files.
-
-
Fixed the
PHP Deprecated: Creation of dynamic property Valet\Diagnose::$progressBarerror which is caused by theprogressBarproperty being dynamically created inDiagnose::beforeRunmethod.The creation of a dynamic property without being defined first is deprecated in PHP 8.2. See https://php.watch/versions/8.2/dynamic-properties-deprecated for more info.
To fix the deprecation error, we just need to declare the property in the class first.
3.1.7 - 2025-03-22
-
Fixed
Ngrok::hasAuthTokenmethod to explicitly check for anauthtokenproperty within the ngrok config file, when the config file already exists.Previously, the method only checks if the config file exists, if it doesn't then the authtoken isn't set. But what if the user added the config manually or edited the file? The method would then always
return trueeven though the token might not exist.Fixed by adding an explicit check of the contents if the file does exist. The contents of the yml config file is read and converted to an associative array.
From this we can then check if the config version is 2 or 3 (v3 has a new config format), and then we can check if the
authtokenkey exists. In v3 theauthtokenis defined in a separateagentkey, so the checks need to be adjusted. -
Fixed
Ngrok::runmethod to check if the command proxying to ngrok executable is theupdateorconfig upgradecommand, if it is then append the ngrok config flag to it. This is just so ngrok doesn't complain it can't find the config, and so we can upgrade the config to v3 without the user specifying the config location.
-
Added
symfony/yamldependency to convert contents of a.ymlfile to an associative array. (Required for the fixedNgrok::hasAuthTokenmethod.) -
Added various output messages to the terminal for
Ngrok::start, so it's more descriptive as to what's happening. -
Added new
CommandLine::shellExecmethod to execute the command in the terminal, and also be able to return the output as a string to the calling method. This is just a wrapper around the native PHPshell_execfunction.
-
Dependency version bump for
mnapoli/sillyto 1.9 -
Refactored
Ngrok::getNgrokConfigmethod to optionally return only the path of the config file (without the leading--configcli flag). (Required for the fixedNgrok::hasAuthTokenmethod.) -
Changed
Ngrok::startmethod to output a message if ngrok errors that the executable is "too old" for the account:ERROR: authentication failed: Your ngrok-agent version "3.3.1" is too old. The minimum supported agent version for your account is "3.6.0". Please update to a newer version with ngrok update...
Because we can't test ngrok commands for errors or errors in the executable (which was tested in commit f8be62b, but reverted in a449582), we need to return the output of any errors and check the output for a specific error code relating to the "too old" error (
ERR_NGROK_121). Then output a message (along with the original error output) to the user to inform them that they can update ngrok executable and also upgrade the config file themselves by performing the valet commands:valet ngrok updateandvalet ngrok config upgraderespectively.All errors other errors will still output to the terminal.
-
Removed the functionality of starting a new CMD window in
Ngrok::startof thesharecommand, since a new window will surpress any errors. We need to be able to output the errors as and when they happen. -
Removed the
--debugflag from thesharecommand since this is now defunct with the removal of the new CMD window. (Debug only prevented the CMD window opening, forcing errors to be logged directly to the terminal.) (Not a breaking change.)
3.1.6.1 - 2025-03-11
- Fixed version number because in v3.1.6 release, Valet didn't have it's version bumped, so it was displaying as v3.1.5. Fixed by bumping version to v3.1.6.1
3.1.6 - 2025-03-06
- Added emergency batch script to stop and uninstall services if errors occur when running
composer global updatewithout uninstalling valet first. This happens 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, so a subsequent composer update is able to work.
- Fixed
php:whichcommand to obtain the linked sites and merge with the parked sites array. Previously, it was only getting the parked sites, so not all sites were obtained and queried.
3.1.5 - 2025-03-03
-
Fixed a deprecation notice in PHP 8.4:
Valet\CommandLine::run(): Implicitly marking parameter $onError as nullable is deprecated, the explicit nullable type must be used instead.
When an optional function argument is typed eg.
callable $onError = null, it is implicitly casted tonullvia it's default value, this is now deprecated in 8.4. Usually we can just use a union typecallable|null, this is explicitly tells PHP it is eithercallableornull. However, union types were only introduced in 8.0. To keep backward compatibility for PHP 7, we can use the nullable type operator (?) instead.Using the nullable type operator fixes the deprecation notice in 8.4 and is backwards compatible for PHP 7 and 8.
3.1.4 - 2024-08/06
- Fixed a bug with AcrylicDNS when Valet is installed on Linux on Windows via WSL2, WSL2 wouldn't launch on system reboot (Fix PR by @jerrens in #15).
- Changed the binding address to
127.0.0.1instead of0.0.0.0. Fixes #14
- Changed the binding address to
3.1.3 - 2024-05-23
-
Fixed Valet install failure, particularly with Ansicon due to spaces in the user directory name (Fix PR by @shahriarrahat in #12).
- Adds a
pathFilterfunction to replace the directory name with it's Windows shortname equivalent. e.g. fromJohn DoetoJOHNDO~1. For use with thevaletBinPathfunction that is used in the Ansicon installation.
- Adds a
-
Fixed multiple cmd or powershell commands for spaces by wrapping them in double quotes.
-
Fixed errors where composer diagnostics and the valet diagnostics output file couldn't be written because it was trying to write to the terminal's current working directory, which could be a protected directory like
Program Files. AddedVALET_HOME_PATHto the commands, so that they get saved to~/.config/valet. -
Fixed the copying of the diagnostics output to clipboard that just stopped working for unknown reasons. Fixed by changing
cli->runtocli->powershellto ensure that the copy commandclipis available. -
Fixed the nginx config check command in
diagnose, where it errors out because it couldn't find the file due to:-
the path after the
-coption couldn't be the shortened username via thevaletBinPath(). Changed it back to use__DIR__. And added an escaped double quotes (\") around it. -
the replacing of all backslashes in the command. This meant that with the new escaped double quotes it changed the backslash to forward slash. So instead of
-c \"C:/Users/...it was changed to-c /"C:/Users/...and the system interpreted it as"C:/C:/Users/...Fixed by changing the replace function to use a regex that only replaces single backslashes and disregards the escaped quotes.
-
-
Changed
pathFilterfunction from #12 to replace forward slashes with backslashes to prevent errors within the function where paths aren't exploded because the/s. But replaced the backslashes back to forwardslashes once the function was complete and fix further errors that occurred. -
Moved the
diagnosecommands array into the__constructfunction so that we can use the globalvaletBinPathfunction and allow the paths to also be changed to the short username if needed. -
Changed various
diagnosearray commands to use thevaletBinPathfunction and the command that has theCOMPOSER_GLOBAL_PATHto use thefilterPathfunction.
3.1.2 - 2024-05-17
-
Fixed #11 bug that couldn't find the PHP executable when trying to add the default when installing valet. It would fail to get the PHP when there is a space in the path like
c:/Program Files/php/. Wrapping the path in quotes in the underlying cmd command fixes this. -
Fixed an issue with the
diagnosecommand which was brought up in #11. The command wasn't available if valet wasn't installed, and could never be installed because of the PHP bug above. Fixed this by always havingdiagnosecommand available whether valet is installed or not.
3.1.1 - 2024-03-25
- Aesthetic only - Added the logo as an ASCII art to the namespace command
valet; and thevalet listcommand, via extending Silly's Application class.
- Updated dependencies for Laravel installer to add support for Laravel 11, (PR by @ onecentlin in #10).
3.1.0 - 2024-02-28
- Added new
paritycommand to get a calculation of the percentage of parity completion against Laravel Valet for macOS.
- Updated dependencies for Laravel installer to add support for Laravel 10, (PR by @hemant-kr-meena in #8).
-
Fixed #6 PHP 8+ deprecation notice for required parameters declared after optional parameters.
The notice would only show when the PHP ini
error_reportingsetting wasn't ignoring deprecation notices, and all reports are enabled, ie.E_ALL. This notice would then be displayed in the terminal on everyvaletcommand. Though it doesn't impact valet's functionality, it could potentially be broken in future PHP versions.Fixed by:
-
Adding a default
nullvalue to the$debugparameter for the optional--debugoption of thesharecommand. -
Removing the default
nullvalue from the$keyparameter of the optionalkeyargument of thelogcommand. Because the key is used to specify the name of a specific log and omitting the argument will make valet list all the log file names, it doesn't need to have a default value.
-
- The
installconfirmation question of outdated cretueusebiu package. Doesn't affect valet functionality.
3.0.0 - 2023-09-21
-
Added support for multiple PHP services, (Feature PR by @iamroi in cretueusebiu#195).
- Enables the use of the previously disabled
valet usecommand, to switch the default PHP version used by Valet. - Adds new commands
php:add,php:remove,php:install,php:uninstall,php:list,xdebug:install,xdebug:uninstall.
- Enables the use of the previously disabled
-
Added PHP version to the
linkscommand output (Patch 1 PR by @damsfx in iamroi#1). -
Added PHP version to the
parkedcommand output, improvements to the Patch 1 above and a new commandphp:which(Patch 2 by @yCodeTech in #1)-
Adds
defaultorisolatedto the PHP version output, with the latter being coloured green for emphasis in bothparkedandlinkscommands. This acts as a 2 in 1, showing the PHP version, and determines whether the site is isolated. -
Adds
AliasandAlias URLto theparkedcommand output. If the parked site also has a symbolic link, it's linked name (aka alias) and alias URL will be outputted in the table. -
Adds new
php:whichcommand to determine which PHP version the current working directory or a specified site is using. -
Changes the output table to vertical for easier reading, using Symfony's
setVerticalmethod (only works when Valet is installed on PHP 8.1).
-
-
Added new
isolateandunisolatecommands. Isolates the current working directory or a specified site (also specify multiple sites) to a specific PHP version, and removes an isolated site (also unisolate all sites), respectively. -
Added
version_aliasto theaddPhpfunction in theConfiguration.phpfile, creating an alias name for the full PHP version, which is then written to the user's Valetconfig.json. A full PHP version of 8.1.8 will have the alias of 8.1, the alias can then be used in commands. -
Added PHP's
krsortfunction to theaddPhpfunction in theConfiguration.phpfile, so that the PHP array in the user's Valetconfig.jsonis written in a natural decending order that adheres to decimals.Natural decending order example:
8.1.18 8.1.8 7.4.33This means that when two different patch versions of the same SemVer MAJOR.MINOR version of PHP is added like 8.1.8 and 8.1.18; and then the
usecommand is ran with the alias version like 8.1, then the default will be set to the most recent version of that alias. In this example, it would be 8.1.18. -
Added
isolatedcommand to list all the isolated sites. -
Added
Version Aliasto the table output ofphp:list. -
Added
--isolateoption to thelinkcommand to optionally isolate the site whilst making it a symbolic link. -
Added the ability to unsecure a site when a secured linked site is unlinked before removing the site's conf to ensure it's removed from Windows internal certificate store.
-
Added the ability to unisolate a site when an isolated linked site is unlinked, to ensure it removes it properly.
-
Added
securedcommand to list all the secured sites. -
Added Valet Root CA generation and sign TLS certificates with the CA (PR by @shawkuro in cretueusebiu#179).
-
Added row separators for horizontal tables.
-
Added
sitescommand to list all sites in parked, links and proxies. -
Added
set-ngrok-tokento set ngrok authtoken and added a command alias for it:auth. -
Added
--debugoption to thesharecommand to prevent the opening of a new CMD window, and allow error messages to be displayed from ngrok for easier debugging. This is needed because ngrok may fail silently by opening a new CMD window and quickly closes it if it encounters an error, so no errors are outputted. -
Added an
--optionsoption to thesharecommand to pass any ngrok options/flags for the ngrokhttpcommand, which Valet will pass through to ngrok. Also added a shortcut-o. See the docs for information on how this works. -
Added
sudocommand and gsudo files. The new command is topassthruValet commands to the commandline that need elevated privileges by using gsudo. gsudo is asudoequivalent for Windows, it requires only 1 UAC popup to enable the elevation and then all commands will be executed as the system instead of having multiple UACs opening.Also added an error message for if
valet sudo sudois ran, because you can't sudo the sudo command. -
Added
valetBinPathhelper function to find the Valet bin path, and updated all the code to use it. -
Added a check to see if a site is isolated before unisolating it.
-
Added command example usages to display in the console when using
--help. -
Added a progressbar UI to
servicesfunction, andinstall,uninstall,restart,stopcommands to improve the UX. -
Added
erroroutput to thegetPhpByVersionfunction to cut down on duplicateerrorcode that relates to the function. -
Added a sleep for 0.3s (300000 microseconds) in between the
uninstallwarning and the question to allow the warning be output before the question is outputted. And simplified the if statements. -
Added a command alias of
unparkto theforgetcommand. -
Added a composer conflict for the old unmaintained cretueusebiu/valet-windows version, just so composer can't install this 3.0 version alongside it.
-
Added parity related additions for proxying.
- Added
--secureoption toproxycommand. - Updated the proxy stub to be the unsecure proxy stub as default.
- Changed the
proxyCreateinSiteclass to accommodate for the new--secureoption. - Added new
secure.proxy.valet.confstub for the secure proxy. - Changed
resecureForNewTldto check for the newsecure.proxystub to ensure it keeps it secured when reinstalling Valet. - Added support for proxying multiple sites at once by separating them with commas, in both
proxyandunproxycommands.
- Added
-
Changed package namespace to
yCodeTech. -
Changed capitalisation from
valettoValetin various outputs and code comments where the don't refer to the commands. -
Changed the output table to vertical for easier reading on those longer columns, with an optional argument to draw the table horizonally.
-
Renamed the
usePhpfunction toisolateinSite.phpfile to reflect it's command name. -
Updated ngrok to the latest version of 3.3.1
-
Moved Valet's version variable out and into it's own separate file for ease.
-
Changed various function return types.
-
Changed output tables
SSLcolumns toSecurefor easier understanding. -
Changed
errorhelper function to throw an exception when specified to do so, and add more meaning to the error output by constructing the error message from theExceptionclass. This is because sometimes the exception doesn't output the exact error or file names needed in order to debug. So reconstructing the error from the class methods should fix it. -
Changed the table style to
boxwhich outputs solid borders instead of using dashes. -
Changed the name of the
starts_withandends_withhelper functions tostr_starts_withandstr_ends_withrespectively to reflect the PHP 8+ functions. -
Updated various output texts.
-
Changed the way the
securecommand was getting the current working directory to use thegetSiteURLfunction instead. -
Changed various
warnings toerrors. -
Changed
domaintext and variables tositeto properly reference thesite. -
Changed text to use the proper capitalisation of
Xdebug. -
Changed the 404 template to be more visually appealing by adding the Valet 3 logo - the logo also acts as a clarification that if the 404 happens we know it's something to do with Valet and nothing else.
-
Changed Xdebug's installation behaviour to no longer install automatically, without specific flag being present. This is because Xdebug is only a PHP debugging service, so if it's not used, then it's wasting a bit of resources.
- Added an
--xdebugoption to the commandsphp:addandinstallto optionally install Xdebug while installing the PHP or installing Valet respectively. - Added an optional
phpVersionargument to the commandsxdebug:installandxdebug:uninstallto install or uninstall Xdebug for a specfic PHP version. If installing and the version is already installed, ask the user if they want to reinstall it. - Added function to check if a supplied PHP version is the alias or not, and a function to get the full PHP version by the alias. Used in
PhpCgiXdebugandPhpCgifiles. - Added a function to check if Xdebug of a specfic PHP version is installed, or if a version isn't supplied then check if any version is installed for the PHP installed in Valet. Used for many of the commands to uninstall if it is installed.
- Added the service ID to
WinSwFactoryto allowWinSWfunctions get the and use the full ID in order to fully check if it's installed. Used inPhpCgiXdebug,PhpCgi, andNginxfiles. - Changed Xdebug service name.
- Changed the powershell cli command of the
installedfunction ofWinSWfile to use the newly added service ID instead of the name. And removed the now unnecessary extra code. - Changed various warning outputs to errors.
- Removed the
getPhpCgiNamefunction fromPhpCgiXdebugclass because the function exists in the parent class and should be used instead, thus removing duplicate code. - Fixed
xdebug:install, previously, when no PHP version is passed, the command will reinstall Xdebug even if it's already installed without asking the user. Fixed so that it asks just as it does when a PHP version was passed. Changed the output text accordingly. - Removed the redundant
isInstalledServicefunction in favour of using theinstalledfunction ofWinSW, as it does exactly the same, thus removing duplicate code.
- Added an
-
Changed the path argument of
php:addto required rather than optional (removed the square brackets). -
Changed the
servicesfunction in theValet.phpfile to outputnot installedinstead ofmissingfor the Xdebug services, because it's not essential for Valet to run, so it shouldn't be labelled as missing. -
Replaced the
DIRECTORY_SEPARATORsand\\for/in all paths and usingstr_replaceto replace\\into/, so there isn't any weird paths likeC:\\sites/mysite. -
Overhauled the
diagnosecommand.-
Changed
Diagnoseclass to use theprogressbarhelper function instead of initiating Symfony'sProgressBarclass separately. -
Removed commands not applicable for Windows.
-
Added various other commands that will be necessary to debug.
-
Added a
COMPOSER_GLOBAL_PATHconstant to the helpers and agetComposerGlobalPathfunction to theValetclass to be able to get and use the global path of composer in the commands. -
Fixed the output for
composer global diagnose, where it would only output 1 line of an info and no diagnostics. Fixed by outputting it to a file first and then reading the file before removing it. -
Fixed the output for
composer global outdatedto format as a HTML table in the output for copy. Additionally, made the terminal output more human readable depending on the command option used. -
Removed the unnecessary
runCommandfunction, and used thepowershellfunction of theCommandLineclass instead. Powershell is used because it has native support for thecatfunction, which is the alias ofGet-Contentfor getting file contents. -
Fixed the ability to copy to clipboard.
-
Various changes to output for human readability or because the raw output wasn't good enough or had quirks.
-
-
Changed
logcommand to usecatalias of the Powershell'sGet-Contentcommand instead of thetailcommand which only works in Git Bash.-
Also changed the options to that of Powershell's variants
-Tailfor how many lines and-Waitfor following real time output. -
Swapped around the Valet command's options, and changed various descriptions.
-
Changed the
runCommandCommandLinefunction to allow real time output. ThesetTimeoutis set to 0 to allow it to run for what should be "forever". Though this can't be tested for obvious reasons. -
Added a boolean param to all the other commandline functions that utilise the aforementioned function, so they can pass along and use the real time output if/when needed.
-
- Removed the deprecated PHP PowerShell files.
- Removed unnecessary/redundant/duplicate code.
- Removed the
--siteoption from theusecommand that was added in cretueusebiu#195, in favour of using theisolatecommand. - Removed the deprecated
getLinksfunction in theSite.phpfile. - Removed the deprecated and unnecessary
publishParkedNginxConf,runOrDie,should_be_sudo,quietly,quietlyAsUserfunctions. - Removed the unsupported
trustcommand. - Removed the hardcoded ngrok options from the
sharecommand in favour of the new--optionsoption. - Removed the
echofrom thetrustCafunction that was in the PR code from cretueusebiu#179 - Removed various outputs to fully streamline the progressbar UI and prevent multiple progressbars in the output because of multiple infos interrupting it.
- Removed the ability to download PHP via an internal PowerShell script (
php.ps1), because keeping it updated with the current versions of PHP and deprecating it's ancestor versions is impractical. Deleted the file and all related PHP.inis. - Removed and deleted the unused and outdated tests,
.dockerignore,phpunit.xmlconfig files, and the related composer dependencies and scripts. - Removed the deprecated and unused legacy home path code, inline with the Mac version.
- Removed the obsolete
domainalias fortldcommand.
-
Fixed securing sites with an SSL/TLS certificate, both normally and when proxies are added by adding the localhost IP address to the Nginx conf listen directives. (PR by @RohanSakhale in cretueusebiu#208).
-
Fixed a bug where sometimes the link won't be unlinked under certain conditions. In accordance with official PHP guidelines of the
unlink()function, the functionrmdir()fixes this issue to remove symlink directories.If the file is a symlink, the symlink will be deleted. On Windows, to delete a symlink to a directory, rmdir() has to be used instead.
-
Fixed Nginx
lintfunction to properly check the confs for errors. -
Fixed filesystem
copyfunction to use the@operator to suppress pr-error messages that occur in PHP internally. And added an inlineerrorfunction ifcopyfails. We do this, so that we can construct proper meaningful error output for debugging. -
Partial fix for a possible bug where if a site is using a framework that sets a site URL environment variable in a
.envfile such as theWP_HOMEfor Laravel Bedrock, then when trying to request the site and the TLD is different from the one set in Valet, then the site automatically redirects to use the URL from the environment variable. This ends in Valet returning a 404 error, because as far as Valet is concerned it's not valid site. This then results in the response being cached by the browser and keeps requesting the cached version of the site even if the TLD has been changed to match.Example:
WP_HOME='http://mySite.test', Valet is set to use thedevTLD and gets a request tohttp://mySite.dev, the site will auto redirect tohttp://mySite.test. 404 Not Found error appears. The response fromhttp://mySite.testis cached by browsers. Valet is changed to usetestTLD, and gets a request forhttp://mySite.test. The previously cached error response is served.This partial fix adds
no cacheheaders to Nginx configuration files to try and prevent the browsers caching sites at all. -
Fixed
servicescommand to correctly loop through and check all PHP services. -
Fixed
fetch-share-urlcommand by:- Replacing the outdated
nategood/httpfulcomposer dependency withguzzlehttp/guzzlefor REST API requests to get the current ngrok tunnel public URL, and copy it to the clipboard. - Changing the
findHttpTunnelUrlfunction to use array bracket notation. - Changing the
domainargument tositeto properly reference the site without getting confused with the ngrok--domain. - Added a command alias:
url.
- Replacing the outdated
-
Fixed
on-latest-versioncommand to use Guzzle and added a new composer dependencycomposer/ca-bundleto find and use the TLS CA bundle in order to verify the TLS/SSL certificate of the requesting website/API. Otherwise, Guzzle spits out a cURL error. (Thanks to this StackOverflow Answer.)Also added a command alias:
latest. -
Fixed
ngrokcommand to accept options/flags, using the new--optionsoption. See the docs for information on how this works. -
Fixed
php:removecommand to enable it to remove PHP by specifying it's version; by adding aphpVersionargument and changing thepathargument to an option (--path), makingphpVersionthe main way to remove instead. -
Fixed
startcommand by removing the whole functionality and utilise Silly'srunCommandto run therestartcommand instead, so they're effectively sharing the same function. This is because it was unnecessary duplicated code. -
Fixed lack of output colouring when using PHP
passthrufunction by adding a 3rd party binary, Ansicon, along with a new class withinstall/uninstallfunctions and added the function calls to the Valetinstall/uninstallcommands respectively.For whatever reason, the
passthrufunction loses the output colourings, therefore the visual meaning is lost. What Ansicon does is injects code into the active and new terminals to ensure ANSI escape sequences (that are interpreted from the HTML-like tags<fg=red></>) are correctly rendered. -
Fixed a bug where a non-secured isolated site's server port was being replaced with the PHP port and was being served with the default server instead of the isolated server.
So instead of the usual port 80:
127.0.0.1:80in the site's isolated config file, nginx was actually listening for the site on port 9002:127.0.0.1:9002, which is the port where PHP 7.4 was configured to be hosted. This confused nginx because it couldn't find port 80 in the site's config file, so it used the default server instead, in which the default PHP version was set as 8.1 on the port 9001, and thus serving the site under the wrong PHP version.Fixed by removing the
preg_replacein thereplacePhpVersionInSiteConffunction of theSiteclass. (This doesn't affect the PHP isolation and still works as intended.) -
Fixed an oversight while changing the TLD by allowing isolated sites TLD to be changed. Previously, if there is an isolated site, changing the TLD wouldn't change the isolated site's conf file, thus leaving it as the old TLD. This fix adds a
reisolateForNewTldfunction to unisolate the old TLD site and reisolate the new TLD site. Also works for sites that are both isolated and secured. -
Fixed
unlinkcommand to properly get the site from the current working directory if nonamewas supplied, by using the previouslyprivate, nowpublicgetLinkNameByCurrentDir()function. Also changed the error message in the latter function to include the multiple linked names. -
Fixed
stopfunction of thePhpCgiclass to onlystopthe PHP CGI or PHP CGI Xdebug if it's installed.This prevents errors occurring when
uninstalling Valet. It would try tostopXdebug services for all PHP versions available to Valet, even though all Xdebug services may not be installed. -
Fixed
unsecure --alltoexitthe script if there are no sites to unsecure, otherwise nginx would still run afterwards, which is not needed. -
Fixed
uninstallcommand to only unsecure sites if they are any secured sites. Also prevented theunsecureAllfunction from exiting the script if the call came fromuninstall. Also added an option shortcut-pfor--purge-config. -
Fixed
installcommand to detect if Valet is already installed. Checks the services to see if they are running, if they are, Valet will ask a question whether to reinstall Valet or not. Also changedservicesfunction (which this fix uses) to disable the progressbar when it's called frominstall. -
Fixed the Xdebug
failed to restarterror in therestartfunction of thePhpCgiclass (of whichPhpCgiXdebugclass shares) by adding a check to see if the Xdebug service is installed, it will only restart the service if it's installed.This is because previously, if there is a version of Xdebug installed and other versions of PHP didn't have their corresponding Xdebug installed, and the
restartfunction is ran, Valet would then spit out an error in complaint of the Xdebug PHP version failing to restart, because it's not installed. -
Fixed the
defaultPHP configuration oninstall, by allowing Valet to only set the default PHP if they key doesn't exist or if it'snull.This is because previously, upon installing Valet, if the config file already exists with a default PHP set, Valet will always reset the default no matter what, even if Valet is set to use a version other than the version it finds from the
where phpCMD command, which gets it from Windows PATH (eg. default in config: 7.4.33, Valet finds: 8.1.8; Valet resets the default back to 8.1.8).- Also fixed a bug in relation to this flaw... When adding the default PHP, Valet would sometimes fail to get the PHP path because of the inconsistent capitalisation of the drive letter in the PHP path. If the path's drive letter is a lowercase, it would fail because of the strict comparison between the former and Valet's retrieval of the uppercase letter from
where php(eg. config: c:/php/8.1; Valet retrieves: C:/php/8.1).
Therefore, the comparison returns
nulland sets the default asnull. Then further installation scripts would stop because of theCannot find PHP [null] in the listerror.Valet will now convert the drive letter to a lowercase via the native
lcfirstPHP function in bothaddDefaultPhpfunction ofConfigurationclass and in thephp:addcommand. So now the default PHP should never benull. - Also fixed a bug in relation to this flaw... When adding the default PHP, Valet would sometimes fail to get the PHP path because of the inconsistent capitalisation of the drive letter in the PHP path. If the path's drive letter is a lowercase, it would fail because of the strict comparison between the former and Valet's retrieval of the uppercase letter from
-
Fixed #3 where upon a fresh installation of Valet with no config.json, it would try to read the config even if it's not yet created and spits out an "Failed to open stream: No such file" error. Fixed by adding a check to see if the file exists in the
readfunction of theConfigurationclass (fix PR by @hemant-kr-meena in #4).