Fatal error: Uncaught Symfony\Component\Console\Exception\LogicException: Cannot set a default value when using InputOption::VALUE_NONE mode. in ~/.composer/vendor/laravel/valet/vendor/symfony/console/Input/InputOption.php:159
Sometimes I find myself wondering how to un-park a folder, and it takes me awhile to find `forget` in the list.
Adding `unpark` as an alias may be helpful.
Fixes#756
Previously if `php` was installed as just `php` (the default Homebrew alias), Valet would not detect *which* PHP version was actually installed, and therefore `valet use` might do incorrect or unnecessary installations/links/etc.
NOTE: This does NOT "convert" existing `php` alias to a numbered version. It merely accepts it as-is, but notes its version in an attempt to avoid extra installations.
*NOTE: Specifally tested with PHP 7.4 and 7.3. No promises about old 5.6, etc aliases.*
While `valet trust` enables (creates) sudoers entries, there was no cleanup/removal option for this, apart from complete forced uninstall of Valet.
This adds `valet trust --off` so that the sudoers entries can be removed from Valet CLI.
After running `valet directory-listing on` if a URI points to a directory that exists, but the requested file cannot be found in that directory, a directory listing will be displayed.
A 404 will still happen if the project directory cannot be found.
Running `valet directory-listing off` makes a 404 display (without a listing) if the requested file cannot be found.
Supercedes and closes#349 and closes#587
`valet uninstall` only displays information about how to manually uninstall and clean up after Valet.
This PR adds a `--force` parameter, which will forcefully remove Valet and the Homebrew services it installs, as well as clean up the config files and log files.
But for a few post-uninstall composer dependencies, cleanup is very thorough.
This brings idempotency to both `valet install` and `valet uninstall --force`
(There may still be edge cases where other Homebrew or composer packages might create interference with install/uninstall, but this makes things much easier to self-troubleshoot.)
Ngrok Pro plans allow multiple processes, which means you could be serving several sites simultaneously. This PR allows Valet to correctly identify amongst the active ngrok process URLs.
Fixes#145
Previously `valet uninstall` would just shutdown the `nginx` service.
This PR also stops `PHP` and gives a number of instructions on how to do a (nearly) clean uninstall of most Valet dependencies.
And also some troubleshooting tips.
This PR allows passing `--all` to `valet unsecure` to have it remove all certificates from all Valet configs AND from the MacOS Keychain.
This effectively cleans up certificate fragments or broken configs, and can help with troubleshooting.
While it's rare that the dnsmasq won't be started, it feels incomplete to not include the service when starting/restarting valet, since valet depends on it.
When switching to older PHP versions there may be a composer package dependency conflict. This PR adds a note to consider running `composer global update` to update those dependencies. It's only a comment since not all changes in PHP version will require running the update.
Fixes#822