Skip to content

Add php isolation from link command#1360

Merged
mattstauffer merged 2 commits intolaravel:masterfrom
joelbutcher:add-php-isolation-from-link-command
Feb 13, 2023
Merged

Add php isolation from link command#1360
mattstauffer merged 2 commits intolaravel:masterfrom
joelbutcher:add-php-isolation-from-link-command

Conversation

@joelbutcher
Copy link
Copy Markdown
Contributor

This PR improves the valet link command by adding an --isolate option to allow users to link, secure and isolate a site in one command.

Before

valet link --secure && valet isolate

After

valet link --secure --isolate

Please note that the --isolate option requires a .valetphprc file in the projects root directory as I could not get $this->runCommand to accept any additional arguments / options.

Comment thread cli/app.php

if ($secure) {
$this->runCommand('secure '.$name);
$this->runCommand('secure');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of dropping $name here?

Copy link
Copy Markdown
Contributor Author

@joelbutcher joelbutcher Feb 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattstauffer the code behind $this->runCommand() doesn't use anything after the first space character in the command declaration... Which is why I didn't call that method when adding --isolate because specifying a PHP version via string concatenation didn't get passed through 🫠

@mattstauffer mattstauffer merged commit e6beffc into laravel:master Feb 13, 2023
@mattstauffer
Copy link
Copy Markdown
Collaborator

Thanks @joelbutcher!

mattstauffer added a commit that referenced this pull request Feb 13, 2023
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.

2 participants