Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cache: &global_cache

.before_script_test_template: &before_script_test_configuration
# import test DB
- mysql -h mysql -u root -proot ci_test < tests/data/test_db.sql
- mysql -h mysql -u root -proot ci_test --ssl-verify-server-cert=false < tests/data/test_db.sql
# make sure bundle.js exists
- touch src/Frontend/Core/Js/bundle.js
# generate correct parameters.yml
Expand Down
1 change: 1 addition & 0 deletions php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@ protected function configure(): void
);
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('<info>-Started deleting media galleries.</info>');

$this->checkOptions($input);
$this->deleteMediaGalleries();

$output->writeln('<info>-Finished deleting media galleries.</info>');

return Command::SUCCESS;
}

private function checkOptions(InputInterface $input): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ protected function configure(): void
);
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->checkOptions($input);
$this->deleteCachedFolders();
$output->writeln('<info>' . $this->getMessage() . '</info>');

return Command::SUCCESS;
}

private function checkOptions(InputInterface $input): void
Expand Down
6 changes: 4 additions & 2 deletions src/Backend/Modules/Users/Console/ResetPasswordCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function configure(): void
->addArgument('password', InputArgument::OPTIONAL, '(Optional) The desired new password');
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$helper = $this->getHelper('question');

Expand All @@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
sprintf('<error>User not found with email-address "%s".</error>', $questionEmailAddressAnswer)
);

return;
return Command::FAILURE;
}

$questionPassword = new Question('Please provide the users new desired password: ');
Expand All @@ -58,5 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
);

$output->writeln('Password has been updated');

return Command::SUCCESS;
}
}
8 changes: 5 additions & 3 deletions src/Console/Locale/EnableLocaleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function configure(): void
->setDescription('Enable a locale');
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->input = $input;
$this->output = $output;
Expand All @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
]
);

return;
return Command::FAILURE;
}

$this->installedLocale = array_flip($this->settings->get('Core', 'languages'));
Expand All @@ -100,12 +100,14 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$this->showLocaleOverview();
$this->selectWorkingLocale();
if (!$this->askToInstall()) {
return;
return Command::FAILURE;
}
$this->askToAddInterfaceLocale();
if ($this->askToMakeTheLocaleAccessibleToVisitors()) {
$this->askToEnableTheLocaleForRedirecting();
}

return Command::SUCCESS;
}

private function askToEnableTheLocaleForRedirecting(): void
Expand Down
4 changes: 3 additions & 1 deletion src/Console/Locale/ImportLocaleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function configure(): void
->addOption('locale', 'l', InputOption::VALUE_OPTIONAL, 'Only install for a specific locale');
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
// Get input values
$fileOption = $input->getOption('file');
Expand All @@ -48,6 +48,8 @@ protected function execute(InputInterface $input, OutputInterface $output): void
// Import locale
$output->writeln('<info>Importing locale....</info>');
$this->importLocale($localePath, $overwriteOption, $output, $localeOption);

return Command::SUCCESS;
}

private function importLocale(
Expand Down
4 changes: 3 additions & 1 deletion src/Console/Thumbnails/GenerateThumbnailsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ public function __construct(private readonly Thumbnails $thumbnails)
parent::__construct();
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$style = new SymfonyStyle($input, $output);

$style->title('Fork CMS Thumbnail generator');

$this->retrieveSourceFilesAndDestinationFolders($input, $output);
$this->generateThumbnails($input, $output);

return Command::SUCCESS;
}

private function generateThumbnails(InputInterface $input, OutputInterface $output): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function configure(): void
->addArgument('module', InputArgument::OPTIONAL, 'Name of the module to install');
}

protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->formatter = new SymfonyStyle($input, $output);
$module = $this->getModuleToInstall($input, $output);
Expand Down Expand Up @@ -74,6 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output): void

$output->writeln("<info>Module $module is installed succesfully 🎉!");
}

return Command::SUCCESS;
}

/**
Expand Down