Skip to content

Conversation

@NasirNobin
Copy link
Contributor

This PR adds two enhancements:

  1. Running valet isolate (without specifying a PHP version) on a directory where there's a .valetphprc file is present, Valet would recognize that.
  2. Running valet use (without specifying a PHP version) on an isolated site directory would change global PHP version to that isolated version.

Fixes #1209

Tests: I'm not sure how do we test codes from cli/valet.php yet. I would be happy to add tests if I can get some guidance.

@NasirNobin NasirNobin marked this pull request as ready for review March 21, 2022 12:46
@NasirNobin NasirNobin marked this pull request as draft March 29, 2022 20:56
* Read .valetphprc on isolation command

* wip

* wip

* wip

* remove $site->getSiteUrl() dependency to avoid expection

* StyleCI patch
@NasirNobin NasirNobin force-pushed the isolation-with-valetphprc branch from 204a713 to fa0bd53 Compare March 31, 2022 18:31
@NasirNobin NasirNobin marked this pull request as ready for review March 31, 2022 18:33
@NasirNobin
Copy link
Contributor Author

Updated to utilize the new Site::phpRcVersion() method. This should be ready for review now.

@mattstauffer
Copy link
Collaborator

Tests: I'm not sure how do we test codes from cli/valet.php yet. I would be happy to add tests if I can get some guidance.

There aren't any yet, but I've been meaning to add some. We don't need to hold up this PR for that but I'll make an issue.

@mattstauffer mattstauffer merged commit e1dbf1a into laravel:master Apr 6, 2022
@mattstauffer
Copy link
Collaborator

Great work as always @NasirNobin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

valet use, when run in an isolated directory, should pull that directory's isolated PHP version

2 participants