Skip to content

fix(php-fpm): correct socket creation #1515

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/Valet/Brew.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function getParsedLinkedPhp(): array
}

/**
* Gets the currently linked formula by identifying the symlink in the hombrew bin directory.
* Gets the currently linked formula by identifying the symlink in the homebrew bin directory.
* Different to ->linkedPhp() in that this will just get the linked directory name,
* whether that is php, php74 or [email protected].
*/
Expand Down
5 changes: 3 additions & 2 deletions cli/Valet/PhpFpm.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function install(): void

$this->restart();

$this->symlinkPrimaryValetSock($phpVersion);
$linkedPhpVersion = $this->brew->linkedPhp();
$this->symlinkPrimaryValetSock($linkedPhpVersion);
}

/**
Expand Down Expand Up @@ -331,6 +332,6 @@ public function utilizedPhpVersions(): array
return $this->normalizePhpVersion(str_replace(['valet', '.sock'], '', $sock));
}
}
})->merge([$this->brew->getLinkedPhpFormula()])->filter()->unique()->values()->toArray();
})->merge([$this->brew->linkedPhp()])->filter()->unique()->values()->toArray();
}
}
2 changes: 1 addition & 1 deletion tests/PhpFpmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function test_utilized_php_versions()
'[email protected]',
]));

$brewMock->shouldReceive('getLinkedPhpFormula')->andReturn('[email protected]');
$brewMock->shouldReceive('linkedPhp')->andReturn('[email protected]');

$nginxMock->shouldReceive('configuredSites')
->once()
Expand Down