Skip to content

refactor: remove LegacyCLIVersion from codebase#28

Merged
miguelsanchez-upsun merged 2 commits intomainfrom
cli-116-remove-legacy-cli-version
Mar 12, 2026
Merged

refactor: remove LegacyCLIVersion from codebase#28
miguelsanchez-upsun merged 2 commits intomainfrom
cli-116-remove-legacy-cli-version

Conversation

@pjcdawkins
Copy link
Contributor

Summary

  • Remove the LegacyCLIVersion variable (always reported "0.0.0" since 73a97c7)
  • Remove "Embedded Legacy CLI version" from verbose --version output
  • Simplify legacy cache directory from legacy-{PHPVersion}-{LegacyCLIVersion} to legacy-{Version}
  • Simplify user agent string to use CLI version directly

🤖 Generated with Claude Code

LegacyCLIVersion is no longer meaningful in the unified codebase.
The ldflag that set it was removed in 73a97c7 and it has reported
"0.0.0" since then.

- Remove the LegacyCLIVersion variable
- Remove "Embedded Legacy CLI version" from verbose version output
- Simplify legacy cache directory to use the CLI version alone
- Simplify user agent string (use CLI version, drop WRAPPER field)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 12, 2026 15:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the unused LegacyCLIVersion constant from the legacy wrapper and updates related outputs/identifiers to rely on the wrapper’s version instead.

Changes:

  • Removed the LegacyCLIVersion global and its use in tests.
  • Removed “Embedded Legacy CLI version …” from verbose version output.
  • Simplified the legacy cache directory name and the legacy CLI USER_AGENT value to no longer include LegacyCLIVersion.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/legacy/legacy.go Removes LegacyCLIVersion, updates cache dir naming, and simplifies USER_AGENT construction.
internal/legacy/legacy_test.go Updates the legacy wrapper test to no longer set LegacyCLIVersion.
commands/version.go Removes verbose output line that printed legacy.LegacyCLIVersion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@miguelsanchez-upsun miguelsanchez-upsun merged commit 6ec6e09 into main Mar 12, 2026
4 checks passed
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.

3 participants