[ax] Deprecate -n shortcut for --dry-run - #8456
Closed
TomasVotruba wants to merge 1 commit into
Closed
Conversation
TomasVotruba
force-pushed
the
tv-deprecate-n-dryrun
branch
from
September 4, 2026 08:25
8cd3b82 to
8287981
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
-nis registered as the short form of--dry-run. In almost every other CLI tool (Symfony Console included)-nmeans--no-interaction. An agent or user carrying that convention over silently triggers a dry-run when they meant something else - a quiet footgun.What
Deprecate the
-nshortcut without breaking it: when-nis used, warn on stderr and point to the explicit flag.-nstill works exactly as before (dry-run) - no behavior change, just a warning.getErrorStyle), so stdout /--output-format=jsonstay clean.--dry-runis unaffected (no warning).Removal of the shortcut itself is left for the next major version.
Verification
rector process -n-> warning on stderr, still dry-runs, stdout clean.rector process --dry-run-> no warning.Note
Whole-repo
check-csis currently red onConfigInitializer.php/SymfonyStyleFactory.phpdue to a merge-time rewrite; that is fixed in #8455. Once #8455 lands, rebasing this branch turns CI green. This PR touches onlyProcessCommand.php.