Should always provide CAserial, but should only provide CAcreateserial if file does not exist. Should probably fix permissions issue mentioned in the comments when attempting to create certificate.
The former approach of using `nightly` to grab the latest in-dev PHP version isn't working well now that the `nightly` build is an alias for 8.0 ... and 8.0 isn't resolving composer packages since most haven't tagged anything compatible with it yet.
So switching to `7.4snapshot` allows testing against the next announced PHP version set to release later this year.
Last year's Homebrew's PHP packaging changes altered their version numbering strategy.
Now that their changes appear to have stabilized, Valet also needs some updates to match.
The `linkedPhp()` function was parsing the symlinked directory name for where the php binaries are stored, but that numbering strategy has morphed over time.
This PR changes the logic to accommodate the most common directory naming strategies I can find, including those of older installs.
I've included some examples of these names in code comments for future reference since finding a variety of them can be complicated.
When no homebrew-installed PHP version is found, Valet attempts to install one.
The old default was `php71`. This PR changes it to `php`, which will install the latest Homebrew PHP version.
The problem with installing an older version is that Homebrew no longer symlinks it automatically. Rewriting Valet to do the symlinking is a little more involved since we should check for "which" version to link, vs other versions installed, etc.
Simply changing the default to the primary supported PHP version allows Valet to rely on Homebrew symlinking it properly.
- added `putenv()` for Laravel compatibility
- added `$_ENV` for generic compatibility
- added wildcard processing, so site array named `*` gets processed always (if present), and then site-specific entries are added and will override the wildcard.
Sample `.valet-env.php`:
```php
<?php
return [
'*' => [
'USER' => 'vagrant',
],
'demo' => [
'MY_CUSTOM_VAR' => 'special_value',
'USER' => 'travis',
],
];
```
(Note: order of entries in the array is irrelevant, as the parser reads `*` first, followed by site-specific entries.)