1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00
Commit Graph

348 Commits

Author SHA1 Message Date
David Connolly
5cf4aea612 Cater for filepaths with spaces
Fixes issue where certificates fail to be generated due to a space in the filepath
2019-12-03 22:47:12 +00:00
Chris Brown
02ad7f44ff Dnsmasq allows use of a common config folder, much like nginx and php do.
This PR changes Valet's default config process to empower this feature, which makes installation less intrusive, and easier to identify and remove valet-specific customizations.

This will make for easier troubleshooting
... and easier customizing (such as dropping in a custom logging config, additional TLDs, alternate DNS resolvers, etc)

Also removes old dnsmasq configs used by prior Valet versions
2019-12-02 15:02:56 -05:00
Matt Stauffer
30b0684736 Merge pull request #853 from drbyte/dnsmasq-restart
Include dnsmasq in valet start/restart command
2019-12-01 22:06:27 -05:00
Matt Stauffer
35a5f95abf Convert comma to semicolon 2019-12-01 22:05:54 -05:00
Matt Stauffer
f0a8fb9bb6 Merge pull request #852 from drbyte/patch-4
Display nginx config errors on start
2019-12-01 22:05:21 -05:00
Matt Stauffer
0681437219 Merge pull request #854 from drbyte/valet-unsecure-all
Add --all parameter to valet unsecure command
2019-12-01 14:55:43 -05:00
Matt Stauffer
8eea03f6a2 Merge pull request #835 from jrbarnard/bugfix/parked-merge-overwrite
Do not show sites in parked if they would not be served
2019-12-01 12:57:12 -05:00
Chris Brown
d6f06045fc Add --all parameter to valet unsecure command
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.
2019-11-30 16:38:48 -05:00
Chris Brown
cfa8c216fa Include dnsmasq in valet start/restart command
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.
2019-11-30 16:34:08 -05:00
Chris Brown
e046fff6f6 Display nginx config errors on start
While since #268 valet has been checking nginx configs for errors when starting/restarting, the captured errors are never displayed if there is a failure because it's being run using `quietly()`. 
This PR causes the errors to pass through to the console so we can more readily understand why nginx may not be starting or not serving properly.
2019-11-30 16:31:18 -05:00
lee
bfd2f3ea5d Updated SUPPORTED_PHP_VERSIONS and LATEST_PHP_VERSION constants to 7.4 2019-11-29 23:06:20 +01:00
Chris Brown
e8d49c42bf Symfony/Process 4.4.0 compatibility
Process `4.4.0` changed command-line parsing by being more aggressive with substitutions, causing our intended literal `"$NF"` to throw an exception.

https://github.com/symfony/process/compare/v4.3.8...v4.4.0#diff-9a01fc0e340da4c3f1e4a16029a63977R1644-R1653
2019-11-21 12:04:13 -05:00
James Barnard
afedf5be57 Do not show sites in parked if they would not be served (parked after a site with the same name, or an existing linked site) 2019-10-21 23:18:38 +01:00
James Barnard
cb8d971097 Ignore parked paths that are not directory when getting parked sites 2019-10-21 22:56:10 +01:00
James Barnard
b16559a450 Merge branch 'master' into feature/links-with-parked 2019-10-04 07:30:35 +01:00
James Barnard
921776ff11 Deprecate getLinks 2019-10-02 15:53:15 +01:00
James Barnard
b3ef3b1367 Fix stripe -> strip typo 2019-10-02 15:10:46 +01:00
James Barnard
e5dceb2bc5 Check for tld on end of certificate file name to support multi segment tld's 2019-10-02 13:56:51 +01:00
James Barnard
9d4126856d Add 'parked' command to show all sites which have been parked using valet park 'path' 2019-10-02 13:31:06 +01:00
Matt Allan
76a0c3222e Fix incorrect comments 2019-08-07 11:11:51 -04:00
Chris Brown
fee6fec141 Fix "sudo: sorry, you are not allowed to preserve the environment" messages
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.)
2019-05-14 16:55:27 -04:00
Matt Stauffer
dc0e14a3ea Re-write Process version comment 2019-04-11 15:46:16 -04:00
Pascal Krason
6182e0c8b5 Fixed warning on newer symfony/process versions 2019-04-11 21:38:35 +02:00
Pascal Krason
18cddd336a Fixed warning on newer symfony/process versions 2019-04-11 20:20:23 +02:00
Matt Stauffer
9570e12ec7 Revert new fromShellCommandLine call 2019-04-11 08:22:17 -04:00
Matt Stauffer
001bb1f13a Merge pull request #760 from ikari7789/refactor-create-certificate
Fix issue with CA serial params
2019-04-08 11:54:24 -04:00
Pascal Krason
737be28bf5 Fixes deprecated Process argument passed as string
Passing a command as string is deprecated since Symfony 4.2.
2019-04-08 16:19:39 +02:00
Andrew Miller
e336ebc12f Fix issue with CA serial params
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.
2019-04-08 17:30:40 +09:00
Matt Stauffer
f39e4fc2de Merge pull request #721 from timciep/patch-1
Fix SSL Certificate creation
2019-04-03 16:16:04 -04:00
Tim Cieplowski
f50b7dbe11 handle SSL .crt creation "Permission denied" failure 2019-03-20 11:35:31 -04:00
Zachary King
9b83e9d015 Remove outdated option in brew install options
Resolves #725
2019-02-03 15:50:38 -05:00
Tim Cieplowski
62edb056b4 fix ssl certificate creation 2019-01-30 11:09:23 -05:00
James Barnard
e5e7c74f1d use formula to restart php instead of version 2019-01-29 12:29:28 -05:00
James Barnard
290c22a1f7 added suggested 7.2 and fix doesn't typo 2019-01-28 20:26:13 -05:00
James Barnard
0bf3078220 update to unlink not the current version but the currently linked formula path (handles bug with latest version under php path) 2019-01-28 20:26:13 -05:00
James Barnard
ece3a1ff2f clean up to remove search, refactor to better handle versions using regex 2019-01-28 20:26:13 -05:00
James Barnard
6a5c06e934 add tests for use version and return the found version to output 2019-01-28 20:26:13 -05:00
James Barnard
6158e5129b add more tests for new methods and bits of clean up 2019-01-28 20:26:13 -05:00
James Barnard
25c4fab2b4 stop running php and search brew for php to verify can install it before trying the wrong formula, todos for tests 2019-01-28 20:26:13 -05:00
James Barnard
28748baa80 working on php version and tests 2019-01-28 20:26:13 -05:00
Chris Brown
83b1b2c467 Rework PHP version resolution
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.
2019-01-09 14:28:43 -05:00
Chris Brown
7dd06db2b0 Change default PHP install pkg to 'php'
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.
2019-01-07 21:41:35 -05:00
Sahib J. Leo
001058414b #691 Surround with quotes all paths which might contain blank spaces. 2018-12-27 11:24:41 -05:00
Weizhe Sun
d75810239a Remove redundant return. 2018-12-21 21:21:09 -05:00
Till Krüss
b3ce1c4a15 Support PHP 7.3 2018-12-07 16:21:43 -05:00
Sahib J. Leo
b05c773e1d Addressing issue #678 2018-12-05 09:00:59 -05:00
Chris Brown
027812c25f Pre-create the parent .config dir if needed
On a fresh OSX install, the ~/.config/ dir doesn't always exist. This checks and creates it if needed.
2018-11-13 09:34:21 -05:00
Chris Brown
2f17e688ce Add DomainException declaration to #353 2018-09-18 23:27:46 -04:00
Matt Stauffer
0323607850 Merge pull request #353 from antonioribeiro/improveUnlink
Unlink renamed links
2018-09-18 22:24:09 -04:00
Chris Brown
c815e349f4 Fix errors from relocation of config dir 2018-09-13 20:57:09 -04:00