Skip to content

Conversation

tuj
Copy link
Contributor

@tuj tuj commented Aug 31, 2025

Link to issue

#249

Description

Added update command.

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

@tuj tuj self-assigned this Aug 31, 2025
@tuj tuj added the enhancement New feature or request label Aug 31, 2025
@tuj tuj requested a review from turegjorup August 31, 2025 09:10
@tuj tuj added this to the 3.0.0 milestone Aug 31, 2025
@tuj tuj mentioned this pull request Aug 31, 2025
34 tasks
Copy link
Contributor

@turegjorup turegjorup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to iterate a little on the app:update command. I would expect it to just update everything (migrations and templates). How many confirmations we prompt for i don't know. Could be just at first, could be individually for migrations and for templates.

See https://github.com/kimai/kimai/blob/main/src/Command/InstallCommand.php for inspiration

} else {
$io->warning($text);

return Command::FAILURE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantics, but not sure I think a status can fail. Even warning might be excessive. I would prefer that we either:

  • Keep the --status option but change to info / success
  • Change to --validate-install and use warning / error

// TODO: Update existing templates.
protected function configure(): void
{
$this->addOption('force', 'f', InputOption::VALUE_NONE, 'Update all requirements. Otherwise, update command only checks requirements.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the naming combination here. --force means something else for me. If we need a status command I would make a dedicated app:status.

For aap:update we could follow doctrine migrations:

  • no option: Prompt for "are yoy sure?"
  • --no-interaction: just run

'--update' => true,
]);
$migrationsCommand->setInteractive(false);
$application->doRun($migrationsCommand, $output);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the called command fail we should also fail.

@tuj tuj requested a review from turegjorup September 1, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants