NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2143 most downloaded on Packagist
Library for work with Git repository in PHP.
Latest stable
v4.6.0
Last release 1 years ago
10 Nov 2025
Ships fairly regularly
a new release about every 7 months
Nearly every release is documented
notes for 41 of 43 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
44 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
PHPStan: added baseline
PHPStan: added baseline
GA: build.yml - PHPStan - updated PHP versions
GA: build.yml - PHPStan - updated PHP versions
dropped support for PHP 5.6-7.3
This release was sponsored by @AlexSkrypnyk . Thank you very much!
Your coding agent can read these notes before it upgrades. Set up the MCP server →
RunnerResult - accepts raw output & error output
RunnerResult - accepts raw output & error output (#100)GitRepository - method run() is public now (#100)Full Changelog: https://github.com/czproject/git-php/compare/v4.2.0...v4.3.0
RunnerResult - accepts raw output & error output (#100)GitRepository - method run() is public now (#100)Full Changelog: v4.2.0...v4.3.0
Git: isRemoteUrlReadable() - returns TRUE for empty repositories
isRemoteUrlReadable() - returns TRUE for empty repositories (#92)Full Changelog: https://github.com/czproject/git-php/compare/v4.1.0...v4.2.0
isRemoteUrlReadable() - returns TRUE for empty repositories (#92)Full Changelog: v4.1.0...v4.2.0
* added OldGitRunner (#86, #82) Full Changelog: https://github.com/czproject/git-php/compare/v4.0.5...v4.1.0
OldGitRunner (#86, #82)Full Changelog: https://github.com/czproject/git-php/compare/v4.0.5...v4.1.0
GitRepository: methods pull(), push() & fetch() accepts string[] in $remote argument
GitRepository: methods pull(), push() & fetch() accepts string[] in $remote argument (#77)GitRepository: methods pull(), push() & fetch() accepts string[] in $remote argument (#77)GitRepository: checkout() - removed --end-of-options option
checkout() - removed --end-of-options option (#77)uses --end-of-options after command options (for security reasons)
--end-of-options after command options (for security reasons)GitRepository: fixed parameters in git log commands (closes #70)
GitRepository: fixed parameters in git log commands (closes #70)CliRunner: fixed reading of STDOUT
--no-color option for git branch commandschanged namespace to CzProject\GitPhp
IGitCzProject\GitPhpGitRepository - return-type changed to staticCzProject\GitPhp\Git with methods open(), init() & cloneRepository()GitRepository::execute() uses variadics parametersexec() replaced by proc_open() (see CzProject\GitPhp\Runners\CliRunner)GitRepository::isChanges()GitRepository::getLastCommitId() returns CzProject\GitPhp\CommitIdGitRepository::getCommit()GitRepository::getCommitAuthor() (use GitRepository::getCommit() instead)GitRepository::getCommitDate() (use GitRepository::getCommit() instead)GitRepository::getCommitMessage() (use GitRepository::getCommit() instead)GitRepository::getCommitData() (use GitRepository::getCommit() instead)return-type self changed to IGit
self changed to IGit (#61)GitRepository: fixed getCommitDate()
getCommitDate() (#55)GitRepository: added methods getCommitDate() & getCommitAuthor()
GitRepository: added methods getCommitDate() & getCommitAuthor() (#54)
fixed GitRepository::cloneRepository() on PHP 7.4
GitRepository::cloneRepository() on PHP 7.4 (#46)GitRepository: added methods getCommitMessage() & getCommitData() (#36, #31)
getCommitMessage() & getCommitData() (#36, #31)cloneRepository() uses proc_open() instead of exec() (#37)GitRepository: fixed getLastCommitId() on Windows
getLastCommitId() on Windows (#38)GitRepository: fixed isRemoteUrlReadable() on non-Windows platforms
GitRepository: fixed isRemoteUrlReadable() on non-Windows platforms (#35)
GitRepository: added method getRemoteBranches()
GitRepository: added method getRemoteBranches() (#34)
GitRepository: fixed isRemoteUrlReadable() on Windows
isRemoteUrlReadable() on Windows (#33)GitRepository: addFile() throws exception if file doesn't exists
addFile() throws exception if file doesn't exists (#32)GitRepository: fixed hasChanges()
hasChanges() (#25)getLastCommitId() (#24)Nothing published for this version
GitRepository: added method execute
executeGitRepository - hasChanges() calls git update-index -q --refresh
hasChanges() calls git update-index -q --refresh (#17)createTag() - added parameter $options
createTag() - added parameter $options (#16)GitRepository: STDERR is redirected to STDOUT
added exit-code to exception messages (for example Command 'git commit -m 'init commit'' failed (exit-code 128).)
Command 'git commit -m 'init commit'' failed (exit-code 128).)added static method GitRepository::isRemoteUrlReadable()
GitRepository::isRemoteUrlReadable() (#7)addRemote, renameRemote, removeRemote & setRemoteUrl (#9, #10)Nothing published for this version
added new method addAllChanges()
addAllChanges() (#8)added new argument $params for GitRepository::cloneRepository()
$params for GitRepository::cloneRepository() (#6)- added new method fetch() (#4) - updated README - typo
fetch() (#4)- added new method push() (#3) - updated README
push() (#3)- added new method pull()
pull() (#2)GitRepository: changed method & property visibility from private to protected
GitRepository: changed method & property visibility from private to protectedIGit: added missing getLocalBranches()method isChanges() is now deprecated, use hasChanges() instead
isChanges() renamed to hasChanges() (#1)isChanges() is now deprecated, use hasChanges() insteadadded new argument into init() method
init() methodchanged behavior of getBranches() - returns list of all remote and local branches in repository from now (BC break)
getBranches() - returns list of all remote and local branches in repository from now (BC break)getLocalBranches()getCurrentBranchName() works from now with all branches in repository (remotes and locals)cloneRepository() - alias for git clone <URL> <directory>files moved into /src directory
/src directoryCz\Git\Git renamed to Cz\Git\GitRepository (BC break)__constructor (BC break)add → addFile, branchCreate → createBranch, ...) (BC break)removeTag, renameTag, getTags, getBranches and getRepositoryPathinit ($repo = GitRepository::init('/path/to/directory');)removed bad USE statement from code
- added method rename() - fixed typos
rename()Nothing published for this version
One column per quarter.