-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release Version 4 #1318
Release Version 4 #1318
Conversation
Re-work how BasicValetDriver serves files in projects with and without `public/` directory
- 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
…nto mes/extract-server-class
Extract Server class and refactor loading of drivers
…valet into mes/type-hints-and-return-hints
Can you keep support for PHP 7.4? I use Valet for WordPress development (as I'm sure many others do also) and due to the nature of WordPress, I am forced to support a minimum of PHP 7.4. |
@pryley PHP 7.4 is EoL: https://www.php.net/supported-versions.php You should move away from it asap. |
@driesvints It's not a choice that I have. With Laravel/Symfony I have the luxury of staying on the cutting edge of PHP, but WordPress is a different beast. Most of its users are hobbyists or self-taught people trying to run a website for their business as cheaply as possible, many don't have great hosting providers and wouldn't know where to start to upgrade their server software. I develop a WordPress plugin that is used by over 50K+ websites. I don't have control of their server configuration, and as long as WordPress recommends PHP 7.4 as the minimum recommended PHP version to use, I have to still support it. Unlike Apple, I don't have control over the ecosystem and I can't simply remove the headphone jack to speed up innovation. |
I agree. When developing a new site or project, it's not an issue but when working on legacy sites that might have constraints (e.g. scripts that are not php8 compatible or older CMS versions from which one wants to migrate) or when trying to troubleshoot / replicate other people's problems, it would be useful to still be able to use PHP7.4 for a while longer. One of the things that makes valet so versatile is the ability to quickly switch between versions, whether via CLI or PHPmon. |
I will continue porting any important security updates/bug fixes to v3 for folks as long as they need it, but the biggest point of this refactor is to re-work the basic architecture, and add more modern coding practices to keep up with the rest of the Laravel world, and that's hard to do while I keep support for older versions of PHP. I have long fought hard for Valet, and all Tighten packages, to work with outdated versions of PHP. So trust me, I'm here for that! But I'm just going to recommend that anyone who works with PHP 7.* projects stick with valet 3 until they're no longer working with those projects, and to let me know if there are any really valuable features that they feel like they need in v3 that I add in v4, and I'll consider it. |
…valet into mes/type-hints-and-return-hints
Unsecure when unlinking
Update version-4 to include #1361
Just installed Valet all running fine so far: Testing share: Maybe add a prompt so users know to type y to continue Installed ngrok added token and then did share but when going to the forward URL: Not sure if that's a user setup issue. Trying to share via expose worked perfectly, again I have to install and add token but no issues sharing a local instance. |
Software / Versions
My test resultsa) Make sure that everything works! Update to Valet v4 beta with composer global require laravel/valet:"^4.0@beta", and run at least one valet command (e.g. valet restart), and then just go about your normal life. Does it work? Do you get an errors? Let me know!
b) Check out the new valet status command; if it returns a failure but your Valet is working correctly, let me know!
c) Try out valet share; you'll now be prompted to install ngrok via Homebrew, or you can try out using it with Expose; I'd love for folks to test both out!
d) If you use .valetphprc, rename the .valetphprc file to .valetrc, and prepend php= to your PHP formula; e.g. [email protected]... and test to make sure everything still works!
e) If you have local sites on PHP 7.1-7.4, switch your linked PHP version to 8+, install Valet v4, then switch your linked version back to your older PHP (valet use [email protected]) and test to make sure everything still works correctly
f) If you have any custom local drivers, let me know if you have any trouble getting them working with v4.
g) As an added exercise, I installed a third party tool called PHP Monitor (PHP Mon for short) and it recognized valet 4 and run successfully :) |
@dcblogdev Thanks so much! I'm not sure what that issue is with ngrok; @muffycompo Thank you so much! And thank you for the exhaustive notes, this is very valuable! |
@muffycompo Thanks for testing PHP Monitor, good to hear it isn't crashing 😁 @mattstauffer Thank you for your hard work on this large refactor, and taking the time to coordinate with me. I appreciate it! I'll give the beta a spin tomorrow as well and will report back, though I'm sure it'll work well given the current extensive test suite 👌 |
Hi Matt and Team! I love to use valet + takeout can you make valet 4 support use shivammatur/php ? So I can use something like this with valet:
|
Hello :) I upgraded and here are my results. My main linked php version is 8.2.3.
PHP monitor also still works great. Appreciate all the hard work! |
OK, I gave the update a spin! Installation and general use seems to work fine. Sites are properly served, and I haven't bumped into any major issues. Site isolation also works correctly, but I haven't been able to test with legacy PHP versions yet. (This is definitely something I will test later this week, and if I bump into issues I'll add another comment here.) The new I don't have any I did run into an issue related to using ngrok. I hadn't used ngrok on this machine yet, so here's what happened: Upon running Upon running It may be worth it to run You could then specify that the user still needs to run After adding the token, sharing seemed to work... but something seems wrong about the port configuration, I'm seeing the same issue that @dcblogdev reported above when I tried to share my local domain My site is accessible via HTTP (non-TLS/https) on This may be a local network thing on my end? Not sure. I was not running any VPN or firewall at the time of testing. |
Hey @caseysoftware, is there any chance you can take a look at the Ngrok issues folks are seeing here with I'll work on adding the @laytan I'll see if I can figure what would cause your Thanks y'all! |
@caturandi-labs I'm sorry, I don't have any plans to extend |
|
Everyone here: Do you have any outstanding concerns before I release Valet v4 to the public? |
No, I've been using it without issue for a few weeks now. Might just be worth adding a note to the docs about altering the DNS for valet share with ngrok. Nice work on the release @mattstauffer! |
Hey, Valet 4 beta testers! Thanks for being here! Here's what I'd love you to test out for me.
Here's the upgrade doc I plan to release to the public; please let me know if it's missing anything: https://github.com/laravel/valet/blob/master/UPGRADE.md
composer global require laravel/valet:"^4.0@beta"
, and run at least onevalet
command (e.g.valet restart
), and then just go about your normal life. Does it work? Do you get an errors? Let me know!valet status
command; if it returns a failure but your Valet is working correctly, let me know!valet share
; you'll now be prompted to install ngrok via Homebrew, or you can try out using it with Expose; I'd love for folks to test both out!.valetphprc
, rename the.valetphprc
file to.valetrc
, and prependphp=
to your PHP formula; e.g.[email protected]
... and test to make sure everything still works!valet use [email protected]
) and test to make sure everything still works correctlyMany of the changes I made in Valet v4 are to make future extension and bug fixing simpler; there are some cool new features, but a lot of it is really architectural shifts instead, so I just want to make sure none of those shifts broke everyone's day-to-day workflows.
Thanks so much!
Original notes from this PR:
Done:
public/
directory #1311frontControllerPath
so drivers don't do so much in there (Extract Server class and refactor loading of drivers #1319)Server.php
(the class) (65b629d)SampleValetDriver
to have the right method signature, etc. (9b09621)valet status
command (Add status command #1329, Valet status command #251)CliTest
)valet
(bash file) to look for a brew-installed-but-not-linked PHP executable and use that throughout the rest of thevalet
file (Support PHP 7.0+ #1346)Server.php
code (update: It works on 7.1-7.4, dropping 7.0 support because I'm not gonna kill all our return types).valetrc
, update calls to.valetphprc
to also support thephp
key of.valetrc
(Add support for.valetrc
#1347)valet status
#1348valet fetch-share-url
when working with Expose #1349)SampleValetDriver
, back up the old one before putting in a new one (15cf3fe)To do after v4 release:
valet status
to check to make sure the certificate authority isn't expiredvalet install
asking for certificate permission for each existing site #1226.valetrc
valet apply-config
or something, that e.g. re-generates nginx config files...install
just for this one siteTo document:
.valetrc
and deprecated.valetphprc
set-ngrok-token
commandvalet share
that's ngrok + expose, and thevalet share-tool
commandupgrade.md
)127.0.0.1
in your DNS if you want to usevalet share