Skip to content

Commit 84f166b

Browse files
gharlanostrolucky
authored andcommitted
Fix command options mode
1 parent c133a7f commit 84f166b

17 files changed

+17
-17
lines changed

src/Command/CreateDatabaseDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function configure(): void
2525
$this
2626
->setName('doctrine:database:create')
2727
->setDescription('Creates the configured database')
28-
->addOption('connection', 'c', InputOption::VALUE_OPTIONAL, 'The connection to use for this command')
28+
->addOption('connection', 'c', InputOption::VALUE_REQUIRED, 'The connection to use for this command')
2929
->addOption('if-not-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database already exists')
3030
->setHelp(<<<'EOT'
3131
The <info>%command.name%</info> command creates the default connections database:

src/Command/DropDatabaseDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function configure()
3333
$this
3434
->setName('doctrine:database:drop')
3535
->setDescription('Drops the configured database')
36-
->addOption('connection', 'c', InputOption::VALUE_OPTIONAL, 'The connection to use for this command')
36+
->addOption('connection', 'c', InputOption::VALUE_REQUIRED, 'The connection to use for this command')
3737
->addOption('if-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database doesn\'t exist')
3838
->addOption('force', 'f', InputOption::VALUE_NONE, 'Set this parameter to execute this action')
3939
->setHelp(<<<'EOT'

src/Command/ImportMappingDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function configure(): void
4646
->setName('doctrine:mapping:import')
4747
->addArgument('name', InputArgument::REQUIRED, 'The bundle or namespace to import the mapping information to')
4848
->addArgument('mapping-type', InputArgument::OPTIONAL, 'The mapping type to export the imported mapping information to')
49-
->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command')
49+
->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command')
5050
->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be mapped.')
5151
->addOption('force', null, InputOption::VALUE_NONE, 'Force to overwrite existing mapping files.')
5252
->addOption('path', null, InputOption::VALUE_REQUIRED, 'The path where the files would be generated (not used when a bundle is passed).')

src/Command/Proxy/ClearMetadataCacheDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ protected function configure(): void
2626
return;
2727
}
2828

29-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
29+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
3030
}
3131
}

src/Command/Proxy/ClearQueryCacheDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ protected function configure(): void
2626
return;
2727
}
2828

29-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
29+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
3030
}
3131
}

src/Command/Proxy/ClearResultCacheDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ protected function configure(): void
2626
return;
2727
}
2828

29-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
29+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
3030
}
3131
}

src/Command/Proxy/CollectionRegionDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ protected function configure(): void
2525
return;
2626
}
2727

28-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
28+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
2929
}
3030
}

src/Command/Proxy/ConvertMappingDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function configure()
3434
return;
3535
}
3636

37-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
37+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
3838
}
3939

4040
/**

src/Command/Proxy/CreateSchemaDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ protected function configure(): void
2727
return;
2828
}
2929

30-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
30+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
3131
}
3232
}

src/Command/Proxy/DropSchemaDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ protected function configure(): void
2626
return;
2727
}
2828

29-
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
29+
$this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command');
3030
}
3131
}

0 commit comments

Comments
 (0)