1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00
Commit Graph

59 Commits

Author SHA1 Message Date
mattstauffer
e75f238b22 Fix code styling 2023-12-21 03:25:35 +00:00
Robert Boes
a3ea286550 Merge remote-tracking branch 'upstream/master' into feat/proxy-multiple-domains 2023-10-02 15:49:35 +02:00
mattstauffer
9a4a7a1693 Fix code styling 2023-08-27 02:47:47 +00: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
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
73b5e987e2 Update phpRc reader to check cwd before checking config, if cwd specified 2023-02-07 18:40:18 -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
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
f13be53b9f Clean up DX for fetch-share-url 2022-12-25 23:59:25 -05:00
Matt Stauffer
fadefb1777 Add type hints and return types to Site and Valet 2022-12-20 15:12:40 -05:00
Matt Stauffer
1220cd6839 Add type hints and return type hints to CommandLine 2022-12-18 15:42:18 -06:00
Dries Vints
a0e1e02a47 Test Valet commands (#1256)
* First attempt at testing CLI commands

* Apply fixes from StyleCI

* Protect from running locally

* Fix test

* wip

* wip

* wip

* wip

* wip

* Update app.php

* Create config folder and files for CLI tests

* Apply fixes from StyleCI

* Fix some formatting

* Fix imports

* Update all output() calls to use the writer passed in by the command

Ugly capture of all $outputs from commands, by passing them into `writer()` to be bound into the container, where they can then be pulled out from calls to `output()` and its buddies `info()`, `table()`, and `warning()`.

* Apply fixes from StyleCI

* Flesh out park command test

* Apply fixes from StyleCI

* Drop php 7.0 and 7.1

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Matt Stauffer <matt@tighten.co>
2022-12-02 09:32:28 +01:00
Matt Stauffer
8246ee6319 Merge pull request #1238 from jjpmann/feature/custom-site-stubs
use getStub to allow custom stub files
2022-12-01 20:25:41 -05:00
Erik | Sobit
2d429c353d solution for only remove the tld if it is at the end of the site name
o check if tld is at the end of the site name and if so remove it
o added corresponding test
2022-11-02 11:53:04 +01:00
Jerry Price
e668e77f3d Merge branch 'master' into feature/custom-site-stubs 2022-07-08 09:21:51 -04:00
Jerry Price
021a4d1a5c use getStub to allow custom stub files 2022-04-13 10:50:41 -04:00
Michael Lehmkuhl
30af32d856 Clean up coding style 2022-04-03 18:44:56 -05:00
Michael Lehmkuhl
315af8904a Add PHP version to valet links output table 2022-04-03 18:35:51 -05:00
NasirNobin
2acd133f9f StyleCI Patch 2022-03-30 03:49:06 +06:00
Nasir Uddin Nobin
d198d7739c wip - refactor with valetphprc version (#10) 2022-03-30 03:48:03 +06:00
Matt Stauffer
29b2f45719 Add --site to isolate and unisolate commands
- Add --site to isolate
- Add --site to unisolate
- Refactor some tests
- Update Site@getSiteUrl to throw an exception instead of returning false
- Fix a few minor typos/grammatical issues
2022-03-21 01:25:23 -04:00
Matt Stauffer
c8e70396e4 Specifically look for cert files in secured() method.
Fixes #1210
2022-03-17 13:08:22 -04:00
Matt Stauffer
383aa62137 Change magic isolation config string to "ISOLATED_PHP_VERSION"
Co-Authored-By: Jacob Baker-Kretzmar <18192441+bakerkretzmar@users.noreply.github.com>
2022-03-14 14:40:45 -04:00
Matt Stauffer
3cdb7c78f4 Drop space before colon in magic isolation string 2022-03-14 12:42:11 -04:00
Matt Stauffer
10eeaeaeda Merge 2022-03-14 11:49:24 -04:00
Matt Stauffer
0e2d1506fb Add test for secured method 2022-03-14 11:28:55 -04:00
Matt Stauffer
51742b3795 Make primary valet.sock a symlink to an existing version 2022-03-12 23:29:01 -05:00
Matt Stauffer
33c797f9ef Drop need to pass sock to isolate command 2022-03-12 00:20:40 -05:00
Matt Stauffer
eefc06b07f Drop PHP 5.6; extract site-specific PHP version isolation to its own commands 2022-03-12 00:05:51 -05:00
Nasir Uddin Nobin
7a80a2e0ea Apply suggestions from code review
Co-authored-by: Matt Stauffer <mattstauffer@users.noreply.github.com>
2022-02-19 08:16:16 +06:00
Nasir Uddin Nobin
9a5d30bb69 Tests for Parallel PHP Version Support 2022-02-18 15:14:57 +06:00
Richard Torenvliet
4283dae3cf Add expireIn= option and use in the openssl command 2021-12-13 15:16:53 +01:00
Taylor Otwell
101abeae0e Apply fixes from StyleCI 2021-12-06 10:40:37 +00:00
Mikaël Popowicz
01f4b582e6 ♻️ Refactoring proxy command. Proxy is not secured by default. 2021-04-30 14:31:55 +02:00
Mikaël Popowicz
bfe95c26dd ♻️ Refactoring secure proxy stub. Fixing SiteTest. 2021-04-23 22:18:14 +02:00
Mikaël Popowicz
3098f5ff0a Merge branch 'master' into feature/unsecure-proxy
# Conflicts:
#	cli/Valet/Site.php
#	cli/stubs/proxy.valet.conf
2021-04-23 22:01:16 +02:00
Mikaël Popowicz
2d5ee9d7cc Add loopback command. 2021-02-21 23:21:12 +01:00
Mikaël Popowicz
34b1cece72 Merging master. 2020-11-30 09:45:11 +01:00
Chris Brown
0b341a7ca1 Update test suite to phpunit 9.5
Update test suite to phpunit 9.5 syntax
Refactored to use polyfill for older PHP versions via `yoast/phpunit-polyfills`

Note: this includes 2 important differences from usual phpunit test suites:
- instead of extending `PHPUnit\Framework\TestCase` we extend `Yoast\PHPUnitPolyfills\TestCases\TestCase`
- instead of handling fixtures via `setUp()` and `tearDown()` we use `set_up()` and `tear_down()` respectively

Comment regarding formatting: I chose to use the FQDN in the `extends` syntax of the class declaration instead of using `use` so that it is more quickly apparent that we're doing something slightly different than usual phpunit syntax, particularly in regards to the set_up() / tear_down() methods that appear immediately following the `extends` line.
2020-11-29 12:10:05 -05:00
Mikaël Popowicz
ea777a9e94 Adding ability to create unsecure proxy. 2020-11-28 23:22:07 +01:00
Beau Simensen
9848bc71b8 Forgot no proxies 2020-04-28 18:29:24 -05:00
Beau Simensen
02749e9e21 Add mocks to get tld 2020-04-28 18:25:02 -05:00
Beau Simensen
9f607ba998 Test the new Proxies features
Updated the `proxies` method to return the URL + .tld
as the rendered output wasn't exactly what one would
expect. While not critical, it was not consistent.

Refactored some of the Site class to aid in testing using
a fake instead of relying on a ton of mocking.

The Site fake has support for both using `tests/output`
as well as named fixtures (`tests/fixtures/Proxies`).

Testing for certificate I/O is pretty whack, but this is
the best I could come up with that would still ensure
the certificate stuff was getting called without
actually requiring `sudo` to run phpunit.

Replaced instances referring directly to `VALET_HOME_PATH`
with calls to the new `valetHomePath()`. This method
is taken over in the fake Site implementation so
that everything runs the same using the fake
Site without having to change other
assumptions.

Updated several "path" methods (and many of their usages)
to take the "thing" you are looking for so you can
either get the path to the type of "thing" you
are looking for or the direct path to the
specific "thing" you are looking for.

Examples:

```
// ~/.config/valet/Nginx
$site->nginxPath();

// ~/.config/valet/Nginx/some-site.com.test
$site->nginxPath('some-site.com.test');
```

Made some other tests related to the existence of `Sites`
directory that resulted in updating the mocks for
many of the other tests.

All in all, it should make other aspects of the Site class
handle things more gracefully if `Sites` doesn't exist.
2020-04-28 11:47:25 -05: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
c89f64f3e6 Fix incorrect new test name 2019-10-02 13:58:47 +01:00