1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Merge branch 'version-4' of github.com:laravel/valet into version-4

This commit is contained in:
Matt Stauffer
2022-12-21 19:57:01 -05:00
5 changed files with 8 additions and 8 deletions

View File

@@ -182,8 +182,8 @@ public function prependPath(string $path): void
public function removePath(string $path): void public function removePath(string $path): void
{ {
if ($path == VALET_HOME_PATH.'/Sites') { if ($path == VALET_HOME_PATH.'/Sites') {
info("Cannot remove this directory because this is where Valet stores its site definitions."); info('Cannot remove this directory because this is where Valet stores its site definitions.');
info("Run [valet paths] for a list of parked paths."); info('Run [valet paths] for a list of parked paths.');
exit(); exit();
} }

View File

@@ -139,7 +139,7 @@ public static function specificDrivers(): array
public static function customDrivers(): array public static function customDrivers(): array
{ {
return array_map(function ($item) { return array_map(function ($item) {
return 'Custom\\' . $item; return 'Custom\\'.$item;
}, static::driversIn(VALET_HOME_PATH.'/Drivers')); }, static::driversIn(VALET_HOME_PATH.'/Drivers'));
} }

View File

@@ -71,7 +71,7 @@ public static function showDirectoryListing(string $valetSitePath, string $uri)
// Output the HTML for the directory listing // Output the HTML for the directory listing
echo "<h1>Index of $uri</h1>"; echo "<h1>Index of $uri</h1>";
echo '<hr>'; echo '<hr>';
echo implode("<br>".PHP_EOL, array_map(function ($path) use ($uri, $is_root) { echo implode('<br>'.PHP_EOL, array_map(function ($path) use ($uri, $is_root) {
$file = basename($path); $file = basename($path);
return ($is_root) ? "<a href='/$file'>/$file</a>" : "<a href='$uri/$file'>$uri/$file/</a>"; return ($is_root) ? "<a href='/$file'>/$file</a>" : "<a href='$uri/$file'>$uri/$file/</a>";

View File

@@ -552,7 +552,7 @@ function (ConsoleCommandEvent $event) {
if ($phpVersion = Site::phpRcVersion($site)) { if ($phpVersion = Site::phpRcVersion($site)) {
info("Found '{$site}/.valetphprc' specifying version: {$phpVersion}"); info("Found '{$site}/.valetphprc' specifying version: {$phpVersion}");
} else { } else {
info(PHP_EOL."Please provide a version number. E.g.:"); info(PHP_EOL.'Please provide a version number. E.g.:');
info('valet isolate php@8.2'); info('valet isolate php@8.2');
exit; exit;
} }

View File

@@ -42,9 +42,9 @@ public function test_fpm_is_configured_with_the_correct_user_group_and_port()
resolve(StubForUpdatingFpmConfigFiles::class)->createConfigurationFiles('php@7.2'); resolve(StubForUpdatingFpmConfigFiles::class)->createConfigurationFiles('php@7.2');
$contents = file_get_contents(__DIR__.'/output/fpm.conf'); $contents = file_get_contents(__DIR__.'/output/fpm.conf');
$this->assertStringContainsString(sprintf(PHP_EOL."user = %s", user()), $contents); $this->assertStringContainsString(sprintf(PHP_EOL.'user = %s', user()), $contents);
$this->assertStringContainsString(PHP_EOL."group = staff", $contents); $this->assertStringContainsString(PHP_EOL.'group = staff', $contents);
$this->assertStringContainsString(PHP_EOL."listen = ".VALET_HOME_PATH.'/valet72.sock', $contents); $this->assertStringContainsString(PHP_EOL.'listen = '.VALET_HOME_PATH.'/valet72.sock', $contents);
// It should disable old or default FPM Pool configuration // It should disable old or default FPM Pool configuration
$this->assertFileDoesNotExist(__DIR__.'/output/www.conf'); $this->assertFileDoesNotExist(__DIR__.'/output/www.conf');