PHPackages                             jolicode/forecast-php-api - 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. jolicode/forecast-php-api

ActiveLibrary[API Development](/categories/api)

jolicode/forecast-php-api
=========================

An up to date PHP client for Harvest Forecast's API

v7.0.0(2y ago)53.4k1MITPHPPHP &gt;=8.1

Since Jan 18Pushed 2y ago14 watchersCompare

[ Source](https://github.com/jolicode/forecast-php-api)[ Packagist](https://packagist.org/packages/jolicode/forecast-php-api)[ RSS](/packages/jolicode-forecast-php-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (16)Used By (0)

A PHP Client for Harvest Forecast API
=====================================

[](#a-php-client-for-harvest-forecast-api)

[![test workflow](https://github.com/jolicode/forecast-php-api/actions/workflows/tests.yml/badge.svg)](https://github.com/jolicode/forecast-php-api/actions/workflows/tests.yml/badge.svg)

[Harvest Forecast](https://www.getharvest.com/forecast) is a planification tool built by Harvest.

This PHP SDK is generated automatically with [JanePHP](https://github.com/janephp/janephp) using a [Forecast OpenAPI specification](Resources/forecast-openapi.yaml). It means that:

- the code in the `generated` dorectory is not hand-written but *generated*;
- if the API changes and you need to fix an API call, please edit the OpenAPI specification file, then [regenerate the SDK](doc/updating-sdk.md).

Installation
------------

[](#installation)

This library is built atop of [PSR-7](https://www.php-fig.org/psr/psr-7/) and [PSR-18](https://www.php-fig.org/psr/psr-18/). So you will need to install some implementations for those interfaces.

If no PSR-18 client or PSR-7 message factory is available yet in your project or you don't care which one to use, just install some default:

```
composer require symfony/http-client nyholm/psr7
```

You can now install the Forecast client:

```
composer require jolicode/forecast-php-api
```

Usage
-----

[](#usage)

First, you need to retrieve an access token. Please checkout Harvest's documentation about the [OAuth2 Authorization Flow](https://help.getharvest.com/api-v2/authentication-api/authentication/authentication/#for-server-side-applications).

Then, use the factory that is provided to create the client:

```
// $client contains all the methods to interact with the API
$client = JoliCode\Forecast\ClientFactory::create(
  $accessToken,
  $forecastAccountId
);

$clients = $client->listClients()->getClients();
$assignments = $client->listAssignments([
  'start_date' => '2019-01-01',
  'end_date' => '2019-01-31',
])->getAssignments();

dump($clients);
dump($assignments);
```

In the above example, the `$client` variable is an instance of the [Client](./generated/Client.php) class, which you can browse through to learn more about the API features.

Want more example or documentation? See the [documentation](doc/index.md).

Available operations
--------------------

[](#available-operations)

Instead of the `listClients()` method above, you can use all of these methods:

- Account:
    - `getAccount()`
- Aggregations:
    - `countScheduledHours()`
    - `getRemainingBudgetedHours()`
- Assignments:
    - `createAssignment()`
    - `deleteAssignment()`
    - `editAssignment()`
    - `getAssignment()`
    - `listAssignments()`
- Clients:
    - `getClient()`
    - `listClients()`
- Persons:
    - `createPerson()`
    - `deletePerson()`
    - `editPerson()`
    - `getPerson()`
    - `listPeople()`
- Placeholders:
    - `createPlaceholder()`
    - `deletePlaceholder()`
    - `editPlaceholder()`
    - `getPlaceholder()`
    - `listPlaceholders()`
- Profile:
    - `whoAmI()`
- Projects:
    - `getProject()`
    - `listProjects()`
- RepeatedAssignmentSets:
    - `createRepeatedAssignmentSet()`
    - `deleteRepeatedAssignmentSet()`
    - `editRepeatedAssignmentSet()`
    - `getRepeatedAssignmentSet()`
    - `listRepeatedAssignmentSets()`
- Roles:
    - `createRole()`
    - `deleteRole()`
    - `editRole()`
    - `getRole()`
    - `listRoles()`

Troubleshoot
------------

[](#troubleshoot)

Got some problems using this library? Need a missing feature? Do not hesitate to [open an issue](https://github.com/jolicode/forecast-php-api/issues)and share it with us.

If some operation is missing or not working correctly, please follow the steps to [regenerate the SDK](doc/updating-sdk.md).

Further documentation
---------------------

[](#further-documentation)

You can see the current and past versions using one of the following:

- the `git tag` command
- the [releases page on Github](https://github.com/jolicode/forecast-php-api/releases)
- the file listing the [changes between versions](CHANGELOG.md)

And finally some meta documentation:

- [versioning and branching models](VERSIONING.md)
- [contribution instructions](CONTRIBUTING.md)

License
-------

[](#license)

This library is licensed under the MIT License - see the [LICENSE](LICENSE.md)file for details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 93.4% 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

Every ~135 days

Recently: every ~256 days

Total

15

Last Release

777d ago

Major Versions

v2.1.1 → v3.0.02020-08-05

v3.0.0 → v4.0.02020-08-19

v4.1.0 → v5.0.02021-04-11

v5.2.0 → v6.0.02022-08-04

v6.0.1 → v7.0.02024-03-29

PHP version history (4 changes)v1.0.0PHP &gt;= 7.1

v5.0.0PHP ^7.2 || ^8.0

v6.0.0PHP &gt;=7.4

v7.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![xavierlacot](https://avatars.githubusercontent.com/u/177293?v=4)](https://github.com/xavierlacot "xavierlacot (57 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (1 commits)")[![oleksiyko](https://avatars.githubusercontent.com/u/4799626?v=4)](https://github.com/oleksiyko "oleksiyko (1 commits)")[![pgrimaud](https://avatars.githubusercontent.com/u/1866496?v=4)](https://github.com/pgrimaud "pgrimaud (1 commits)")[![pyrech](https://avatars.githubusercontent.com/u/2021641?v=4)](https://github.com/pyrech "pyrech (1 commits)")

---

Tags

api-clientforecasthttpjane-phpopenapiswaggerclientsdkswaggeropenapiforecastHarvestharvestappjanephpforecast apiforecastapp

### Embed Badge

![Health badge](/badges/jolicode-forecast-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/jolicode-forecast-php-api/health.svg)](https://phpackages.com/packages/jolicode-forecast-php-api)
```

###  Alternatives

[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[jolicode/harvest-php-api

An up to date PHP client for Harvest's API

2259.9k](/packages/jolicode-harvest-php-api)[apigee/apigee-client-php

Client library for connecting to the Apigee Edge API.

27558.7k3](/packages/apigee-apigee-client-php)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[dhope0000/lxd

PHP-based API wrapper for LXD REST API.

136.2k](/packages/dhope0000-lxd)

PHPackages © 2026

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