Skip to content

Merge --yes with the more conventional --no-interaction#393

Merged
totten merged 2 commits intomasterfrom
master-confirm-b
Jan 29, 2025
Merged

Merge --yes with the more conventional --no-interaction#393
totten merged 2 commits intomasterfrom
master-confirm-b

Conversation

@totten
Copy link
Copy Markdown
Owner

@totten totten commented Jan 29, 2025

Overview

Address the inconsistent behavior of --yes by using the (more consistent) option --no-interaction.

Fix #391

Before

  • civix inherits the option --no-interaction (-n) from Symfony Console.
  • civix also defines the option --yes, but this is only used for 1-2 prompts. Most prompts ignore it.
    • (I suspect it lost a lot relevance when logic was migrated from Command classes to the Generator.)

After

  • civix still inherits the option --no-interaction (-n) from Symfony Console.
  • civix --yes is a deprecated alias for civix --no-interaction.

@totten totten mentioned this pull request Jan 29, 2025
* Before Civix::io() was available, the `AbstractCommand` had a helper called `confirm().
* However, this helper could only be used directly within a `Command` class.
* Now, with Civix::io(), it's reuse helpers in many contexts (commands, generators, upgraders, etc)
@totten totten merged commit 9955d6f into master Jan 29, 2025
@totten totten deleted the master-confirm-b branch January 29, 2025 06:39
@colemanw
Copy link
Copy Markdown
Contributor

Great, thanks @totten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--yes ... or no?

2 participants