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

249 Commits

Author SHA1 Message Date
Austin Drummond
7dfc739502 update secured command test 2023-12-20 00:17:58 -05:00
Robert Boes
a3ea286550 Merge remote-tracking branch 'upstream/master' into feat/proxy-multiple-domains 2023-10-02 15:49:35 +02:00
mattstauffer
a48540d3b4 Fix code styling 2023-09-25 16:55:28 +00:00
Matt Stauffer
eb0bc01d9f Merge pull request #1428 from mcaskill/improve-link-subcommands
Fix link command's `--isolate` argument with custom name
2023-09-25 12:55:01 -04:00
Dries Vints
f9ee253db3 Update tests/CliTest.php 2023-09-08 15:41:14 -04:00
Chauncey McAskill
24e7ed8ab9 Add test of link command's isolate flag
Based on `PhpFpmTest::test_isolate_will_isolate_a_site()` and `CliTest::test_link_command_with_secure_flag_secures()`.
2023-09-08 15:41:14 -04:00
Jason Varga
df9e1effe4 priority test 2023-08-28 16:09:24 -04:00
Jason Varga
e52b901415 add test for static caching 2023-08-28 15:41:41 -04:00
Jason Varga
a93f267c03 adjust tests 2023-08-28 15:40:33 -04:00
mattstauffer
9a4a7a1693 Fix code styling 2023-08-27 02:47:47 +00:00
Matt Stauffer
088667d0ca Merge pull request #1422 from drbyte/stopdnsmasq
Add "valet stop dnsmasq" option
2023-08-26 22:47:18 -04:00
Robert Boes
bb36a3b437 Add support for proxying multiple domains at once 2023-08-25 10:56:06 +02:00
driesvints
c1ef300469 Fix code styling 2023-07-21 03:30:59 +00:00
Chris Brown
269d157b0a Add "valet stop dnsmasq" option
Fixes #1419

Adds:
- `valet stop dnsmasq`
- `valet stop all` (which includes php, nginx, dnsmasq)
- When `valet stop` is called without a service name, a message indicates that dnsmasq can also be stopped via `valet stop dnsmasq`
- Aside: phpfpm now also displays a message when stopping; previously it was silent.
2023-06-20 16:35:59 -04:00
Matt Stauffer
9ce0ca97b2 Ensure base configuration is correct even if file already exists 2023-05-16 08:23:41 -04:00
Chris Brown
615d61dc8e Install older PHP versions via alternate tap
Fixes #1407

Homebrew's support policy now aggressively disables older versions earlier than it did previously.
That is why we tap the `shivammathur/php` repository.

But since Homebrew also now "keeps" those old formulae but marks them as disabled, when Valet runs `brew install php@7.4` it fails because Homebrew just aborts due to its flags in the outdated formula.
(They mark it as "disabled" and/or "keg_only :versioned_formula", but don't actually delete the formula from their repository.)
To override that we must use `brew install shivammathur/php/php@7.4` internally.

Therefore, we need to maintain a list of which PHP Versions we wish to specifically prefix with the `shivammathur/php` tap in order to bypass Homebrew's flags.

**ANNUAL MAINTENANCE**
1. This PR adds the array of `LIMITED_PHP_VERSIONS` which we will have to update annually when new PHP versions are retired as others are released.
2. We should also annually update the `LATEST_PHP_VERSION` string.
2023-05-05 22:17:42 -04:00
Matt Stauffer
dae5773551 Merge pull request #1398 from mischabraam/hotfix/read-non-existing-config-file
Fix read non existing config file
2023-04-26 09:35:19 -04:00
mattstauffer
cbb571f7ac Fix code styling 2023-04-26 13:13:37 +00:00
Mischa Braam
d1ebd43045 Fix read non existing config file 2023-04-04 13:36:08 +02:00
Matt Stauffer
3790e512af Merge branch 'master' into version-4 2023-02-15 13:21:58 -05:00
driesvints
044bdc15a8 Fix code styling 2023-02-14 16:56:59 +00:00
Matt Stauffer
6a920bd5a9 Merge Pint config 2023-02-13 15:39:44 -05:00
driesvints
cda928d1ed Fix code styling 2023-02-13 17:06:56 +00:00
Matt Stauffer
c24ae19972 Bring #1361 into version-4 2023-02-10 20:09:28 -05:00
Matt Stauffer
0e9060d0a6 Update unlink command to also unsecure, if necessary 2023-02-10 18:49:28 -05:00
Matt Stauffer
719ff07eec Bring in changes to mirror #1358 2023-02-07 21:39:32 -05:00
Matt Stauffer
edae5fbdf7 Refactor local network address for Valet 4's Server class 2023-02-07 21:36:26 -05:00
Matt Stauffer
73b5e987e2 Update phpRc reader to check cwd before checking config, if cwd specified 2023-02-07 18:40:18 -05:00
Matt Stauffer
dd8e15edf5 Implement valet fetch-share-url when working with Expose (#1349)
* Flesh out Expose currentTunnelUrl method

* Apply fixes from StyleCI

* Prep for requiring a certain version of Expose

* Don't call installed() before installedVersion() in Composer

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-24 20:53:05 -05:00
Matt Stauffer
f23e1456bb Check whether services are running as the correct user in valet status (#1348) 2023-01-22 21:56:06 -05:00
Matt Stauffer
5c7b2d313a Add support for .valetrc (#1347)
* Add .valetrc support

* Apply fixes from StyleCI

* wip

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-18 20:44:51 -05:00
Matt Stauffer
9143636c76 Add the ability for drivers to check Composer dependencies (#1345) 2023-01-13 21:54:59 -05:00
Matt Stauffer
303462ffd1 Add Expose support, drop ngrok binary and move it to be managed by Brew, drop copying ngrok share URL to clipbaord
* Extract basic driver with public/ from basic driver, and simplify both

* Apply fixes from StyleCI

* Set HTTP_HOST in BaseDriverTest

* Move server helpers to their own file; add type hints

* Update drivers location and loading

- Extract much of server.php into a `Server` class
- Move all but the Laravel and Basic drivers into a subfolder
- Load all but the Laravel and Basic drivers via glob
- Add `beforeLoading` hook to simplify the `frontControllerPath` method for some drivers

* Apply fixes from StyleCI

* Add additional notes to upgrade.md

* Apply fixes from StyleCI

* Require PHP 8.0

* Add type hints and return type hints to Brew

* Apply fixes from StyleCI

* Add type hints and return type hints to CommandLine

* Add type hints and return type hints to Configuration

* Add type hints and return type hints to Diagnose

* Apply fixes from StyleCI

* Add type hints and return type hints to DnsMasq

* Add type hints and return hints to Filesystem

* Add type hints and return types to Nginx

* Add type hints and return types to ngrok

* Add type hints and return types to PhpFpm

* Apply fixes from StyleCI

* Add type hints and return types to Site and Valet

* Apply fixes from StyleCI

* Require passing a version number to isolate command

* Apply fixes from StyleCI

* Bump compat to php 8; add type hints and return types to helpers

* Apply fixes from StyleCI

* Use constructor promotion

* Apply fixes from StyleCI

* Write tests for Server.php

* Apply fixes from StyleCI

* Move upgrade calls into Upgrader class, and add upgrade to check for old custom drivers

* Apply fixes from StyleCI

* Replace some \n with PHP_EOL; move custom drivers into Custom namespace

* Apply fixes from StyleCI

* Add doc blocks

* Clean up NullWriter; drop legacy config check

* Allow null response from frontControllerPath

* Apply fixes from StyleCI

* Drop exits, fix 404 path

* Better handle new installations

* Apply fixes from StyleCI

* Drop extensions

* Clean up DX for fetch-share-url

* Apply fixes from StyleCI

* Fix site::unlink method signature and docblock

* Tweak the wording for the which command

* Support isolated sites running PHP 7.4

* Add a bunch more CLI command tests (#1332)

* Wip some cli tests

* Apply fixes from StyleCI

* Test parked command

* Test forget command

* Update Filesystem::rmDirAndContents to respect symlinks

* Wip cli commands

* Apply fixes from StyleCI

* Test link command, unlink command, and secure command

* Apply fixes from StyleCI

* Add tests for unsecure, unsecure --all, secured commands

Add placeholders for the remaining CLI commands
Add nginx::restart to unsecure --all command

Co-authored-by: StyleCI Bot <bot@styleci.io>

* Drop old config migrations

* Add status command (#1329)

* Build the foundation of a status command

* Apply fixes from StyleCI

* Wip testing status command

* Apply fixes from StyleCI

* Fix status test

* Apply fixes from StyleCI

* Fix race condition in creating test config file

* Apply fixes from StyleCI

* Reset container for each test

* Differentiate response code based on success or failure of status command

* Apply fixes from StyleCI

* Add the ability to test if a Brew service is running

* Apply fixes from StyleCI

* Check for more services running in status command

* Apply fixes from StyleCI

* Test Status

* Apply fixes from StyleCI

* Drop Yoast from base application test case

Co-authored-by: StyleCI Bot <bot@styleci.io>

* Test most of the remaining CLI commands

* Test set tld command

* Test set loopback command

* Test proxy, unproxy, and proxies commands

* Apply fixes from StyleCI

* Test which command

* Test diagnose command

* Test directory-listing and which-php commands

* Text isolate and unisolate and isolated commands

* Apply fixes from StyleCI

* Test trust command

* Apply fixes from StyleCI

* Test on-latest-version command

* Move uninstall text to a class, and tweak text and presentation

* Apply fixes from StyleCI

* Test use command

* Test stop command

* Test start command

* Test restart command

Co-authored-by: StyleCI Bot <bot@styleci.io>

* Drop unnecessary doc blocks (#1339)

* Drop unnecessary doc blocks

* Apply fixes from StyleCI

Co-authored-by: StyleCI Bot <bot@styleci.io>

* Tweak status output and install output

* Add debug instructions to valet status, expand "valet installed" status check

* Drop extensions directory

* Apply fixes from StyleCI

* Remove more docblocks

* Upgrade ngrok to 3.1.0

* Test force uninstall command

* Test log command

* Drop copying Ngrok share to clipboard; add first steps of Expose code

* Add logic paths for Expose vs. ngrok and the share-tool config

* Apply fixes from StyleCI

* Take the first steps of manually installing ngrok and expose when needed

* Apply fixes from StyleCI

* Next steps Brew-installed ngrok

* Apply fixes from StyleCI

* Add class to represent Composer; continue ngrok + expose updates

* Apply fixes from StyleCI

* Add ensureInstalled() method to Expose and installOrFail() to Composer

* Apply fixes from StyleCI

* Require global PHP 8+ to install

* Exit if invalid domain is passed to valet share

* Update Composer dependencies to use Illuminate/Container

* Drop the idea of passing a custom domain to valet share

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-13 21:34:37 -05:00
Matt Stauffer
401a2e96fa Test log command 2023-01-11 19:25:09 -05:00
Matt Stauffer
6a61acbb6c Test force uninstall command 2023-01-11 19:16:15 -05:00
Matt Stauffer
831779cec0 Remove more docblocks 2023-01-11 11:40:32 -05:00
Matt Stauffer
4c10d906f7 Add debug instructions to valet status, expand "valet installed" status check 2023-01-11 11:37:47 -05:00
Matt Stauffer
9a04590abf Tweak status output and install output 2023-01-11 10:33:25 -05:00
Matt Stauffer
c4faf27525 Test most of the remaining CLI commands
* Test set tld command

* Test set loopback command

* Test proxy, unproxy, and proxies commands

* Apply fixes from StyleCI

* Test which command

* Test diagnose command

* Test directory-listing and which-php commands

* Text isolate and unisolate and isolated commands

* Apply fixes from StyleCI

* Test trust command

* Apply fixes from StyleCI

* Test on-latest-version command

* Move uninstall text to a class, and tweak text and presentation

* Apply fixes from StyleCI

* Test use command

* Test stop command

* Test start command

* Test restart command

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-10 23:24:01 -05:00
Matt Stauffer
0c57391eed Add status command (#1329)
* Build the foundation of a status command

* Apply fixes from StyleCI

* Wip testing status command

* Apply fixes from StyleCI

* Fix status test

* Apply fixes from StyleCI

* Fix race condition in creating test config file

* Apply fixes from StyleCI

* Reset container for each test

* Differentiate response code based on success or failure of status command

* Apply fixes from StyleCI

* Add the ability to test if a Brew service is running

* Apply fixes from StyleCI

* Check for more services running in status command

* Apply fixes from StyleCI

* Test Status

* Apply fixes from StyleCI

* Drop Yoast from base application test case

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-05 16:40:27 -05:00
Matt Stauffer
e5e0e03799 Add a bunch more CLI command tests (#1332)
* Wip some cli tests

* Apply fixes from StyleCI

* Test parked command

* Test forget command

* Update Filesystem::rmDirAndContents to respect symlinks

* Wip cli commands

* Apply fixes from StyleCI

* Test link command, unlink command, and secure command

* Apply fixes from StyleCI

* Add tests for unsecure, unsecure --all, secured commands

Add placeholders for the remaining CLI commands
Add nginx::restart to unsecure --all command

Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-12-30 15:07:34 -05:00
Matt Stauffer
f13be53b9f Clean up DX for fetch-share-url 2022-12-25 23:59:25 -05:00
Matt Stauffer
f2a62f51c6 Merge v3 2022-12-22 11:47:01 -05:00
Matt Stauffer
016aaf4920 Merge pull request #1325 from laravel/mes/ngrok-auth-token-command
Add set-ngrok-token command
2022-12-22 11:43:14 -05:00
Matt Stauffer
b200022041 Add set-ngrok-token command 2022-12-22 10:30:50 -05:00
Matt Stauffer
e19afe51ad Clean up NullWriter; drop legacy config check 2022-12-22 00:27:09 -05:00
Matt Stauffer
0f91d88bc4 Clean up NullWriter references 2022-12-22 00:07:24 -05:00
Matt Stauffer
a77030ab08 Merge branch 'version-4' of github.com:laravel/valet into version-4 2022-12-21 19:57:01 -05:00
Matt Stauffer
d44d23daed Add doc blocks 2022-12-21 19:56:57 -05:00
StyleCI Bot
486fb9b339 Apply fixes from StyleCI 2022-12-22 00:54:25 +00:00