Skip to content

Commit e38387c

Browse files
committed
feature: Include app service name in the post-install hook
1 parent 19d9552 commit e38387c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Sail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @method static bool isPersistent(string $service)
1616
* @method static bool isDependedOn(string $service)
1717
* @method static string replaceEnvVariables(string $environment, array $services)
18-
* @method static void runInstallHooks(mixed $command, array $services)
18+
* @method static void runInstallHooks(mixed $command, array $services, string $appService = 'laravel.test')
1919
* @method static void runPublishHooks(mixed $command)
2020
*/
2121
class Sail extends Facade

src/Services.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,14 @@ public function replaceEnvVariables(string $environment, array $services): strin
332332
*
333333
* @param Command $command
334334
* @param array $services
335+
* @param string $appService
335336
* @return void
336337
*/
337-
public function runInstallHooks(Command $command, array $services): void
338+
public function runInstallHooks(Command $command, array $services, string $appService = 'laravel.test'): void
338339
{
339340
foreach ($services as $service) {
340341
if (isset($this->services[$service]) && is_array($this->services[$service]) && ($this->services[$service]['after_install'] ?? null) !== null) {
341-
$this->services[$service]['after_install']($command, $services);
342+
$this->services[$service]['after_install']($command, $services, $appService);
342343
}
343344
}
344345
}

0 commit comments

Comments
 (0)