Skip to content

Commit

Permalink
[8.x] Use Artisan Console View Components (#1132)
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Sep 24, 2024
1 parent 509dc7c commit f0bf5fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Console/ChromeDriverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function handle()

$message = 'ChromeDriver %s successfully installed for version %s.';

$this->info(sprintf($message, $all ? 'binaries' : 'binary', $version));
$this->components->info(sprintf($message, $all ? 'binaries' : 'binary', $version));
}

/**
Expand Down Expand Up @@ -176,7 +176,7 @@ protected function detectChromeVersion($os)
return $matches[1];
}

$this->error('Chrome version could not be detected.');
$this->components->error('Chrome version could not be detected.');

return false;
}
Expand Down
22 changes: 11 additions & 11 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,21 @@ public function handle()
));
}

$this->info('Dusk scaffolding installed successfully.');
$this->components->info('Dusk scaffolding installed successfully.');

$this->comment('Downloading ChromeDriver binaries...');
$this->components->task('Downloading ChromeDriver binaries...', function () {
$driverCommandArgs = [];

$driverCommandArgs = [];

if ($this->option('proxy')) {
$driverCommandArgs['--proxy'] = $this->option('proxy');
}
if ($this->option('proxy')) {
$driverCommandArgs['--proxy'] = $this->option('proxy');
}

if ($this->option('ssl-no-verify')) {
$driverCommandArgs['--ssl-no-verify'] = true;
}
if ($this->option('ssl-no-verify')) {
$driverCommandArgs['--ssl-no-verify'] = true;
}

$this->call('dusk:chrome-driver', $driverCommandArgs);
$this->call('dusk:chrome-driver', $driverCommandArgs);
});
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Console/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function purgeDebuggingFiles($relativePath, $patterns)
$path = base_path($relativePath);

if (! is_dir($path)) {
$this->warn(
$this->components->warn(
"Unable to purge missing directory [{$relativePath}].", OutputInterface::VERBOSITY_DEBUG
);

Expand All @@ -111,6 +111,6 @@ protected function purgeDebuggingFiles($relativePath, $patterns)
@unlink($file->getRealPath());
}

$this->info("Purged \"{$patterns}\" from [{$relativePath}].");
$this->components->info("Purged \"{$patterns}\" from [{$relativePath}].");
}
}

0 comments on commit f0bf5fc

Please sign in to comment.