All notable changes to this project are documented in this file.
Changes since v1.6.0.
- Add
WorkingCopy::merge()to supportgit merge: accepts aCommit,Referenceor string revision, plus optional extra CLI args (e.g.['--no-ff']), mirroring the existingcheckout()method. (#248, fixes #118) - Add
Repository::runProcess()to expose stderr from successful commands:run()only ever returned stdout, even on success, but some git commands (e.g.push) write meaningful output to stderr even when they succeed.run()now delegates to it and keeps its exact original behavior. (#247, fixes #205) - Support git's mnemonic diff prefixes (
diff.mnemonicPrefix) in the diff parser: enabling this option replaces the defaulta//b/prefixes with context-specific ones (c//i//o//w/), which used to raise aRuntimeExceptionin tools like GrumPHP that enable it. (#245, fixes #114) - Support
"copy from"/"copy to"in the diff parser: diffs produced with copy detection enabled (e.g.diff.renames = copies) used to fail to parse.Filegains a newisCopy()flag, andisRename()no longer reportstruefor copies, since a copy's source file still exists afterward. (#244, fixes #14)
- Fix relative paths not resolving against the repository in
Repository::run(): the git process spawned byrun()never had its working directory set, so commands such asapplyresolved paths against the calling script's cwd instead of--work-tree, failing when run from outside the repository directory. (#249, fixes #67) - Fix diff parsing for dirty submodules without an index line: a submodule whose working
tree changed but still points at the same commit is reported by git without an
indexline, which made the parser choke on the next hunk. (#246, fixes #165) - Fix bugs and hardening issues found by a code audit:
(#239)
ReferenceBag::getFirstBranch()could return a non-branch reference, or throw, when no branch existed.Tag::getBodyMessage()dropped or truncated a line for annotated tags using the standardsubject\n\nbodyconvention.Repository::run()can returnnullon failure whendebug=false; several call sites (Tag::isAnnotated(),PushReference::isForce(),Blob::getContent(), ...) did not handle that case and produced wrong data or crashed. All call sites now check fornull.Repository::shell()interpolated the repository path into the shell command without escaping it; it is now passed throughescapeshellarg().Hooks::set()created hook scripts world-writable (0777); they are now created0700.- Fixed the
isSuccessFul()casing typo inAdmin.
- Replace
Gitonomy\Git\Util\StringHelperwithsymfony/string'sCodePointString, which covers the same UTF-8-awarestrlen/substr/strpos/strrposoperations. Breaking:StringHelperis removed, along with its configurable encoding (getEncoding()/setEncoding()); the library now consistently targetsUTF-8. (#252) - Modernize for PHP 8.4+, Symfony 6.4/7.4/8.1+ and PHPUnit 12: full property/parameter/return
type coverage,
readonly/finalwhere applicable, PHPUnit 12 attributes, and new php-cs-fixer/PHPStan/Castor tooling. Breaking: the minimum supported PHP version is now 8.4. (#238) - Add a regression test for reading a blob's content in a tree that also contains a submodule. (#243)
- Replace the network-dependent test fixture (cloned from GitHub on every run) with a local, audited git bundle, plus a Console tool to regenerate it. (#241, #242)
- CI: bump
actions/checkoutto v7 to fix a Node 20 deprecation warning. (#240)
v1.6.0 - 2025-12-09
Earlier versions are not documented here. See the GitHub releases and commit history for prior changes.