Skip to content

[6.x] Accept --no-progress in psalm-refactor - #11995

Merged
danog merged 1 commit into
vimeo:6.xfrom
alies-dev:fix/refactor-no-progress-option
Sep 27, 2026
Merged

danog merged 1 commit into
vimeo:6.xfrom
alies-dev:fix/refactor-no-progress-option

Conversation

@alies-dev

Copy link
Copy Markdown
Contributor

Summary

Addresses #11812 (comment).

Refactor::run() already checks --no-progress when selecting its progress reporter, but the option was missing from its valid long options. Register it so getopt and argument validation accept it, and document it in the CLI help.

Add an end-to-end regression asserting that psalm-refactor --no-progress --help exits successfully with no stderr instead of rejecting the flag.

Created in a fresh worktree from freshly fetched upstream 6.x at 7a3038794.

Verification

  • php psalm-refactor --no-progress --help — passed.
  • vendor/bin/phpunit tests/EndToEnd/PsalmEndToEndTest.php --filter testRefactorAcceptsNoProgressOption — passed (1 test, 2 assertions).
  • vendor/bin/phpcs src/Psalm/Internal/Cli/Refactor.php tests/EndToEnd/PsalmEndToEndTest.php — passed.

A full method-rename smoke attempt encountered a separate existing failure: configuration loading treats the symbol argument as a file path and exits with Cannot locate .... That behavior is unchanged and outside this option-registration fix; regression coverage is limited to option acceptance.

Copilot AI lite review requested due to automatic review settings September 27, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@danog danog added the release:feature The PR will be included in 'Features' section of the release notes label Sep 27, 2026
@danog
danog merged commit 1dcc833 into vimeo:6.x Sep 27, 2026
62 of 63 checks passed
@alies-dev
alies-dev deleted the fix/refactor-no-progress-option branch September 27, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:feature The PR will be included in 'Features' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants