Skip to content

No Auth commands not new skeleton repos #434

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
16 changes: 1 addition & 15 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ protected function configure()
->addOption('livewire', null, InputOption::VALUE_NONE, 'Install the Livewire Starter Kit')
->addOption('livewire-class-components', null, InputOption::VALUE_NONE, 'Generate stand-alone Livewire class components')
->addOption('workos', null, InputOption::VALUE_NONE, 'Use WorkOS for authentication')
->addOption('no-authentication', null, InputOption::VALUE_NONE, 'Do not generate authentication scaffolding')
->addOption('pest', null, InputOption::VALUE_NONE, 'Install the Pest testing framework')
->addOption('phpunit', null, InputOption::VALUE_NONE, 'Install the PHPUnit testing framework')
->addOption('npm', null, InputOption::VALUE_NONE, 'Install and build NPM dependencies')
Expand Down Expand Up @@ -137,20 +136,16 @@ protected function interact(InputInterface $input, OutputInterface $output)
options: [
'laravel' => "Laravel's built-in authentication",
'workos' => 'WorkOS (Requires WorkOS account)',
'none' => 'No authentication scaffolding',
],
default: 'laravel',
)) {
'laravel' => $input->setOption('workos', false),
'workos' => $input->setOption('workos', true),
'none' => $input->setOption('no-authentication', true),
default => null,
};
}

if ($input->getOption('livewire') &&
! $input->getOption('workos') &&
! $input->getOption('no-authentication')) {
if ($input->getOption('livewire') && ! $input->getOption('workos')) {
$input->setOption('livewire-class-components', ! confirm(
label: 'Would you like to use Laravel Volt?',
default: true,
Expand Down Expand Up @@ -781,15 +776,6 @@ protected function generateAppUrl($name, $directory)
*/
protected function getStarterKit(InputInterface $input): ?string
{
if ($input->getOption('no-authentication')) {
return match (true) {
$input->getOption('react') => 'laravel/blank-react-starter-kit',
$input->getOption('vue') => 'laravel/blank-vue-starter-kit',
$input->getOption('livewire') => 'laravel/blank-livewire-starter-kit',
default => $input->getOption('using'),
};
}

return match (true) {
$input->getOption('react') => 'laravel/react-starter-kit',
$input->getOption('vue') => 'laravel/vue-starter-kit',
Expand Down
Loading