This leverages the existing `.valet-env.php` file capability, but just adds the Valet Home directory as a first-lookup location.
So, now Valet will check for `.valet-env.php` in:
- `~/.config/valet/`
- then the current project folder
As discussed at https://github.com/laravel/valet/issues/789#issuecomment-565112046Fixes#789
- 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.)
* Add support for Drupal
* Implement more logic to handle Drupal 6, Drupal 7 and Drupal 8
* Additional fixes for Drupal 8 install. Removed note about Drupal 6 since it doesn't work properly beyond PHP 5.3.
* Rewrite front controller check for Drupal 8
* 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