PHPackages                             websafe/lib-view-helper-git-repository - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. websafe/lib-view-helper-git-repository

ActiveLibrary[Templating &amp; Views](/categories/templating)

websafe/lib-view-helper-git-repository
======================================

A library of ZF2 View Helpers for retrieving information about current application's local Git repository.

0.1.0(12y ago)115BSD-3-ClausePHPPHP &gt;=5.3.3

Since Mar 5Pushed 12y ago1 watchersCompare

[ Source](https://github.com/websafe/lib-view-helper-git-repository)[ Packagist](https://packagist.org/packages/websafe/lib-view-helper-git-repository)[ Docs](http://github.com/websafe/lib-view-helper-git-repository/)[ RSS](/packages/websafe-lib-view-helper-git-repository/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Websafe\\View\\Helper\\Git\\Repository
======================================

[](#websafeviewhelpergitrepository)

A library of [ZF2](http://framework.zend.com/) - [View Helpers](http://framework.zend.com/manual/2.2/en/modules/zend.view.helpers.html) for retrieving information about current application's local [Git](http://git-scm.com/) repository.

Quickstart
----------

[](#quickstart)

### Add this package to your [Composer](https://getcomposer.org/%E2%80%8E) based application

[](#add-this-package-to-your-composer-based-application)

Add this package to `composer.json` and install in `vendor/` by running:

```
composer require \
    websafe/lib-view-helper-git-repository:0.1.*
```

or

```
php vendor/bin/composer.phar require \
    websafe/lib-view-helper-git-repository:0.1.*
```

### Enable provided [view helpers](http://framework.zend.com/manual/2.2/en/modules/zend.view.helpers.html) in your [ZF2 application](https://github.com/zendframework/ZendSkeletonApplication)

[](#enable-provided-view-helpers-in-your-zf2-application)

To enable the provided view helpers in your application - copy the file `websafe.view.helper.git.repository.global.php.dist` found in `vendor/websafe/lib-view-helper-git-repository/config/`, to `config/autoload/websafe.view.helper.git.repository.global.php`.

The copied file declares the required [invokables](http://framework.zend.com/manual/2.2/en/modules/zend.view.helpers.advanced-usage.html#registering-helpers) for the provided [view helpers](http://framework.zend.com/manual/2.2/en/modules/zend.view.helpers.html) in your [ZF2 application](https://github.com/zendframework/ZendSkeletonApplication).

```
return array(
    'view_helpers' => array(
        'invokables' => array(
            'gitRepoCurrentBranch'
                => 'Websafe\View\Helper\Git\Repository\CurrentBranch',
            'gitRepoDescription'
                => 'Websafe\View\Helper\Git\Repository\Description',
        ),
    ),
);
```

### Use provided view helpers in your view scripts

[](#use-provided-view-helpers-in-your-view-scripts)

#### Websafe\\View\\Helper\\Git\\Repository\\CurrentBranch

[](#websafeviewhelpergitrepositorycurrentbranch)

```

```

Result:

```
master
```

#### Websafe\\View\\Helper\\Git\\Repository\\Description

[](#websafeviewhelpergitrepositorydescription)

```

```

Result:

```
Unnamed repository; edit this file 'description' to name the repository.
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4447d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e27fa9be7a1919a23ba7d58baf0fd03b27c07e7995e7f62e75965b774d6f995b?d=identicon)[websafe](/maintainers/websafe)

---

Top Contributors

[![websafe](https://avatars.githubusercontent.com/u/412013?v=4)](https://github.com/websafe "websafe (16 commits)")

---

Tags

pluginhelperzendlocalviewgitzf2view helperrepositoryinfoAbstractHelper

### Embed Badge

![Health badge](/badges/websafe-lib-view-helper-git-repository/health.svg)

```
[![Health](https://phpackages.com/badges/websafe-lib-view-helper-git-repository/health.svg)](https://phpackages.com/packages/websafe-lib-view-helper-git-repository)
```

###  Alternatives

[shoot/shoot

Shoot aims to make providing data to your templates more manageable

41229.9k2](/packages/shoot-shoot)[dereuromark/cakephp-feed

A CakePHP plugin containing a RssView to generate RSS feeds.

1353.7k1](/packages/dereuromark-cakephp-feed)[tasmaniski/zf2-current-route

View Helper for reading current route info: Controller, Action, Module name

366.9k](/packages/tasmaniski-zf2-current-route)[dereuromark/cakephp-meta

A CakePHP plugin for SEO meta tags, OpenGraph and Twitter Cards

1012.9k1](/packages/dereuromark-cakephp-meta)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
