WIP: Symfony 6 project remake #2

Draft
skobkin wants to merge 103 commits from symfony6_remake into master
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 1c223f7077 - Show all commits

View file

@ -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);

View file

@ -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());

View file

@ -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();
}