e-butik/gittern 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

e-butik/gittern

Composer 安装命令:

composer require e-butik/gittern

包简介

A Git library written in pure PHP. Making Git like music for PHP's ears.

README 文档

README

Making Git like music for PHP's ears. Build Status

Version 0.8 under development (because starting out at 0.1 or 1.0 is for squares)

Documentation is available at Read the Docs.

What is Gittern?

Gittern is a PHP library for reading from and writing to Git repositories. It doesn't depend on the git binary, it directly acccesses the repo files.

Gittern provides several interfaces for interacting with your Git repos. Firstly, there's a low level interface, where you manually create blobs, trees and commits. This can however become cumbersome very quickly. As such, there's also two different Gaufrette adapters included.

The first one, GitternCommitishReadOnlyAdapter is pretty much what it sounds like. It's an adapter to which you supply a commitish, and from which you may read the files associated with that commit.

The second one, GitternIndexAdapter allows you to read from and write to the Git index. The Git index is the staging area in which you stage new changes for a commit. Then, when you're ready, creating a commit from the index is quite simple. Just get the tree from the index, and use it to create your commit.

In addition to all of this functionality, Gittern is created with extensibility in mind. How Gittern reads data from the repository on disk is cleanly separated using the adapter pattern, so that if you have the need you could easily implement e.g. an adapter capable of maintaining multiple indexes, or Git object caching in something like MongoDB or Redis (in fact, if you don't care about accessing the repo from the git binary, you could just use this as a fast, distributed backend).

Who's behind all this?

E-butik.se, one of Sweden's foremost e-commerce platform providers. Visit our developer blog.

How do I install Gittern?

Use Composer. More detailed instructions are available in the docs.

How stable is the API?

Not very. We're still refactoring the API pretty much whenever we feel like it. What is semi-stable though is that the Gaufrette adapters will remain compatible with the Gaufrette master branch, so if you're mainly using the Gaufrette adapters, you'll not experience a lot of API breakage.

Kinda-sorta bugs

Planned features

There are several planned features, which didn't make it in to version 0.8.

  • Subclassing Repository with a git binary dependent subclass to allow some advanced commands
  • Packfile creation (currently packfiles can only be read)
  • Support for resolving lightweight tags
  • Support for reading annotated tags
  • Support for the link tree entry type
  • Support for the commit tree entry type (i.e. submodules)
  • Making the Gittern\Entity\GitObject\User class into an interface
  • Support for all kinds of Git Treeishes
  • Support for updating the reflog when moving a branch head

统计信息

  • 总下载量: 4.7k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 54
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 53
  • Watchers: 17
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-04-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固