Skip to content

Fix #211: Replace abandoned git wrapper#345

Merged
samdark merged 2 commits into
masterfrom
issue-211-replace-git-wrapper
May 30, 2026
Merged

Fix #211: Replace abandoned git wrapper#345
samdark merged 2 commits into
masterfrom
issue-211-replace-git-wrapper

Conversation

@samdark

@samdark samdark commented May 30, 2026

Copy link
Copy Markdown
Member

Closes #211.

Summary

  • Remove the abandoned symplify/git-wrapper dependency.
  • Add a small in-tree Git adapter backed by symfony/process for the Git operations used by the dev tool.
  • Update commands and package validation to use the local adapter.

Notes

  • Considered maintained alternatives including gitonomy/gitlib and czproject/git-php. Since both shell out to Git and the project already depends on symfony/process, this keeps the dependency graph smaller while preserving the current feature surface.

Verification

  • php -l on changed PHP files
  • composer validate --strict --no-check-lock
  • git diff --check
  • read-only smoke checks for branch, remote URL, tags, status, and shortlog

No mutating dev-tool Git commands were run during verification.

Copilot AI review requested due to automatic review settings May 30, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown

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 replaces the abandoned symplify/git-wrapper dependency with a small in-repo Git adapter built on symfony/process, and updates existing commands/components to use the new adapter for the Git operations needed by the dev tool.

Changes:

  • Removed symplify/git-wrapper from composer.json.
  • Added an in-tree Git adapter (GitWorkingCopy, GitBranches, GitTags, GitException) backed by Symfony\Component\Process\Process.
  • Updated package Git working copy creation and the contributors stats command to use the new adapter API.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/App/Component/Package/Package.php Switches from GitWrapper to a local GitWorkingCopy instance using a discovered git binary.
src/App/Component/Git/GitWorkingCopy.php New process-backed Git adapter (core implementation).
src/App/Component/Git/GitBranches.php New helper for listing branches and determining HEAD.
src/App/Component/Git/GitTags.php New helper for listing tags.
src/App/Component/Git/GitException.php New exception type for adapter failures.
src/App/Command/Stats/ContributorsCommand.php Uses the adapter to run git shortlog with structured args/options.
src/App/Command/Release/MakeCommand.php Updates imports to the new GitWorkingCopy.
src/App/Command/Git/PushCommand.php Updates exception import to the new GitException.
src/App/Command/AddChangelogCommand.php Updates imports to the new GitWorkingCopy.
composer.json Removes the abandoned symplify/git-wrapper dependency.

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

Comment thread src/App/Component/Git/GitWorkingCopy.php
Comment thread src/App/Component/Git/GitWorkingCopy.php
@samdark samdark changed the title Replace abandoned git wrapper Fix #211: Replace abandoned git wrapper May 30, 2026
@samdark samdark merged commit 970960e into master May 30, 2026
6 checks passed
@samdark samdark deleted the issue-211-replace-git-wrapper branch May 30, 2026 07:31
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.

Replace symplify/git-wrapper to gitonomy/gitlib

2 participants