Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Use Artisan Console View Components #1132

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}].");
}
}