PHPackages                             mattvick/harvest-app-bundle - 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. [API Development](/categories/api)
4. /
5. mattvick/harvest-app-bundle

ActiveSymfony-bundle[API Development](/categories/api)

mattvick/harvest-app-bundle
===========================

Symfony2 wrapper around HaPi Harvest API client for app usage

05551PHP

Since Oct 13Pushed 13y ago1 watchersCompare

[ Source](https://github.com/mattvick/MattvickHarvestAppBundle)[ Packagist](https://packagist.org/packages/mattvick/harvest-app-bundle)[ RSS](/packages/mattvick-harvest-app-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
============

[](#introduction)

Symfony2 wrapper around [HaPi](http://labs.mdbitz.com/harvest-api/) [Harvest](http://www.getharvest.com/) API client for app usage.

MattvickHarvestAppBundle is just a simple proxy bundle between HaPi HarvestAPI client and symfony2. It is only meant to be used as a clientless app.

Code borrowed heavily from [InoriTwitterAppBundle](https://github.com/Inori/InoriTwitterAppBundle) a great Twitter bundle and inspired by [Harvest4Clients](https://github.com/jkenters/Harvest4Clients) a

Example usage
=============

[](#example-usage)

Example use-case for this bundle would be display Harvest data (from your project account) about clients, projects or tasks etc in your system.

Installation
============

[](#installation)

#### With composer:

[](#with-composer)

Add this bundle and the HaPi package to your composer.json:

```
// composer.json
{
    // ...
    require: {
        // ...
        "mattvick/harvest-app-bundle": "master"
    }
    // ...
    "repositories": [
        // ...
        {
            "type": "package",
            "package": {
                "name": "mdbitz/hapi",
                "version": "1.1.1",
                "dist": {
                    "url": "http://labs.mdbitz.com/wp-content/uploads/2010/10/HaPi-1.1.1.zip",
                    "type": "zip"
                }
            }
        }
    ],
}

```

Open up your `app/autoload.php` file and add the HaPi HarvestAPI Autoloader:

```
//app/autoload.php
// ...
require_once __DIR__.'/../vendor/mdbitz/hapi/HarvestAPI.php';
spl_autoload_register( array('HarvestAPI', 'autoload') );
// ...

```

This tells Symfony2 where it can locate your `HarvestAPI` class. Since HaPi Harvest API does not yet follow the PSR-0 Naming standards its autoloader has to be attached manually.

Add this bundle to your application's kernel:

```
//app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Mattvick\HarvestAppBundle\MattvickHarvestAppBundle(),
    );
}

```

Configure the `harvest_app` service in your YAML configuration:

```
#app/config/config.yml
mattvick_harvest_app:
    user:      xxxxxx  # this is your email address
    password:  xxxxxx
    account:   xxxxxx  # this is your Harvest subdomain (see below)

```

**NB!** The `account` is the Harvest subdomain you use to access Harvest, such as: https://**subdomain**.harvestapp.com/.

Now tell composer to download the bundle by running the command:

```
$ php composer.phar update mattvick/harvest-app-bundle

```

Using HarvestApp
================

[](#using-harvestapp)

If the setup is done correctly, then you can start using HarvestApp like this:

```
// ...
$api = $this->container->get('harvest_app')->getApi();

```

An example use in a controller is as follows:

```
// ...
$api = $this->get('harvest_app')->getApi();

$result = $api->getClient(123456);
if ($result->isSuccess()) {
    $client = $result->data;
}

```

To use the advanced reporting functions of HarvestReports:

```
// ...
$api = $this->container->get('harvest_app_reports')->getApi();

```

An example use in a controller is as follows:

```
// ...
$api = $this->get('harvest_app_reports')->getApi();

$result = $api->getActiveProjects();
if ($result->isSuccess()) {
    $projects = $result->data;
}

```

See the [HaPi Harvest API documentation](http://labs.mdbitz.com/harvest-api/docs/) for more examples.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![mattvick](https://avatars.githubusercontent.com/u/651430?v=4)](https://github.com/mattvick "mattvick (20 commits)")

### Embed Badge

![Health badge](/badges/mattvick-harvest-app-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mattvick-harvest-app-bundle/health.svg)](https://phpackages.com/packages/mattvick-harvest-app-bundle)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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