WIP: Symfony 6 project remake #2
|
@ -40,7 +40,7 @@ class ImportUsersCommand extends Command
|
|||
'CSV file path'
|
||||
)
|
||||
->addOption(
|
||||
'check-only',
|
||||
'dry-run',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'If set, command will not perform write operations in the database'
|
||||
|
@ -89,7 +89,7 @@ class ImportUsersCommand extends Command
|
|||
|
||||
$user = new User($row[0], $createdAt, $row[1], $row[2]);
|
||||
|
||||
if (!$input->getOption('check-only')) {
|
||||
if (!$input->getOption('dry-run')) {
|
||||
$this->em->persist($user);
|
||||
$this->em->flush($user);
|
||||
$this->em->detach($user);
|
||||
|
|
|
@ -50,7 +50,7 @@ class TelegramSendMessageCommand extends Command
|
|||
try {
|
||||
$this->messenger->sendMessageToChat(
|
||||
(int) $input->getOption('chat-id'),
|
||||
$message
|
||||
$message,
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
$io->error($e->getMessage());
|
||||
|
|
|
@ -42,7 +42,7 @@ class UpdateSubscriptionsCommand extends Command
|
|||
'If set, command will check subscribers of all service users instead of service subscribers only'
|
||||
)
|
||||
->addOption(
|
||||
'check-only',
|
||||
'dry-run',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'If set, command will not perform write operations in the database'
|
||||
|
@ -59,7 +59,7 @@ class UpdateSubscriptionsCommand extends Command
|
|||
$progress = $io->createProgressBar();
|
||||
$progress->setFormat(ProgressBar::FORMAT_DEBUG);
|
||||
|
||||
if (!$input->getOption('check-only')) { // Beginning transaction for all changes
|
||||
if (!$input->getOption('dry-run')) { // Beginning transaction for all changes
|
||||
$this->em->beginTransaction();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue