`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.)
If you've previously run `valet trust` to allow valet to run without specifying `sudo` repeatedly or entering your password with various valet commands, recent updates to MacOS may give you a `sudo: sorry, you are not allowed to preserve the environment` response when trying to run those `valet` commands.
The fix is in updating the sudoers entry that `valet trust` creates.
This PR tells valet how to update the sudoers entry so that this message doesn't continue.
YOU WILL NEED TO RE-RUN `valet trust` IF YOU HAD PREVIOUSLY RUN IT, after installing this update, in order for this code change to have any effect.
(Technical explanation: the sudoers protections have become stricter, so we have to be more explicit that we do indeed want environment variables to flow through to the sudo user's environment when using valet via sudoers entries.)
* Correct the return type annotation in a serves method
* Type-hint the driver in the abstract ValetDriver
* Correct the return type-hint in the sample ValetDriver
* Remove the return afrom the restartLinkedPhp method
* Remove the return annotation from the Caddy constructor
* Remove the return annotation from the Valet configuration constructor
* Removed the return from the prependPath method of the Configuration class
* Removed the return from the appendAsUser method of the Filesystem class
* Removed the return annotation from the Site constructor
* Corrected the parameter annotation of the link method in the Site class
* Order use statements by length in PhpFpm
* Remove the return annotation from the Valet constructor