Skip to content

Commit c19ac41

Browse files
committed
Use trait InteractsWithDockerComposeServices
1 parent 144e9b5 commit c19ac41

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Console/SailEnvCommand.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
namespace Jedymatt\LaravelSailEnv\Console;
44

5-
use Laravel\Sail\Console\InstallCommand;
5+
use Illuminate\Console\Command;
6+
use Laravel\Sail\Console\Concerns\InteractsWithDockerComposeServices;
67

7-
class SailEnvCommand extends InstallCommand
8+
class SailEnvCommand extends Command
89
{
10+
use InteractsWithDockerComposeServices;
11+
912
/**
1013
* The name and signature of the console command.
1114
*
@@ -45,7 +48,7 @@ public function handle()
4548
return 1;
4649
}
4750

48-
$services = $this->getServicesFromDockerCompose();
51+
$services = $this->getServicesFromCompose();
4952

5053
$this->comment('Detected services from docker-compose.yml: ['.implode(',', $services).']');
5154

@@ -54,7 +57,7 @@ public function handle()
5457
$this->info('Successfully configured .env file.');
5558
}
5659

57-
protected function getServicesFromDockerCompose(): array
60+
protected function getServicesFromCompose(): array
5861
{
5962
$dockerComposeContent = file_get_contents($this->laravel->basePath('docker-compose.yml'));
6063

0 commit comments

Comments
 (0)