Skip to content

Commit 66b7d43

Browse files
authored
Merge pull request #1515 from saibotk/fix-php-fpm-config
fix(php-fpm): correct socket creation
2 parents 2c6a935 + 0525673 commit 66b7d43

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cli/Valet/Brew.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public function getParsedLinkedPhp(): array
259259
}
260260

261261
/**
262-
* Gets the currently linked formula by identifying the symlink in the hombrew bin directory.
262+
* Gets the currently linked formula by identifying the symlink in the homebrew bin directory.
263263
* Different to ->linkedPhp() in that this will just get the linked directory name,
264264
* whether that is php, php74 or [email protected].
265265
*/

cli/Valet/PhpFpm.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public function install(): void
3737

3838
$this->restart();
3939

40-
$this->symlinkPrimaryValetSock($phpVersion);
40+
$linkedPhpVersion = $this->brew->linkedPhp();
41+
$this->symlinkPrimaryValetSock($linkedPhpVersion);
4142
}
4243

4344
/**
@@ -331,6 +332,6 @@ public function utilizedPhpVersions(): array
331332
return $this->normalizePhpVersion(str_replace(['valet', '.sock'], '', $sock));
332333
}
333334
}
334-
})->merge([$this->brew->getLinkedPhpFormula()])->filter()->unique()->values()->toArray();
335+
})->merge([$this->brew->linkedPhp()])->filter()->unique()->values()->toArray();
335336
}
336337
}

tests/PhpFpmTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function test_utilized_php_versions()
122122
123123
]));
124124

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

127127
$nginxMock->shouldReceive('configuredSites')
128128
->once()

0 commit comments

Comments
 (0)