PHPackages                             vivait/docbuild-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vivait/docbuild-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vivait/docbuild-php
===================

PHP client for doc.build

5.2.1(10mo ago)129.2k↓50%2MITPHPPHP &gt;=7.4 || &gt;=8.0CI failing

Since Jan 30Pushed 10mo ago8 watchersCompare

[ Source](https://github.com/vivait/docbuild-php)[ Packagist](https://packagist.org/packages/vivait/docbuild-php)[ RSS](/packages/vivait-docbuild-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (23)Used By (0)

Doc.Build [![Build Status](https://camo.githubusercontent.com/362c59897ad0ead9df7ebdd237f1413e2a3da5b11429841adacff0d42cc481fd/68747470733a2f2f7472617669732d63692e6f72672f7669766169742f646f636275696c642d7068702e737667)](https://travis-ci.org/vivait/docbuild-php)
======================================================================================================================================================================================================================================================================

[](#docbuild-)

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

[](#installation)

```
composer require vivait/docbuild-php

```

and then write an Adapter that's compatible with the [Adapter interface](src/Vivait/DocBuild/Http/Adapter.php).

Usage
-----

[](#usage)

See Doc.Build's Api documentation for detailed information on its methods.

The class requires your client id, client secret and a compatible [Adapter](src/Vivait/DocBuild/Http/Adapter.php).

```
// Instantiate your adapter
$client = new MyAdapter();

$docBuild = new DocBuild($clientId, $clientSecret, $client);

$docBuild->createDocument('ADocument', 'docx', '/path/to/file.docx');

$docs = $docBuild->getDocuments();

$docBuild->convertToPdf('documentid', 'http://mycallback.url/api');
```

### Caching

[](#caching)

This library uses the `doctrine/cache` library to cache `access_token` between requests. By default it will use the `Doctrine\Common\Cache\FilesystemCache`, but this can be changed by injecting a cache that implements `Doctrine\Common\Cache\Cache` into the constructor:

```
$docBuild = new DocBuild(
    $clientId,
    $clientSecret,
    GuzzleAdapter::createWithConfig([]),
    $options,
    null,
    new ArrayCache()
);
```

### Manually refresh access\_token

[](#manually-refresh-access_token)

By default, the client will automatically refresh your `access_token`. However, this behaviour can be changed by setting the following option, or passing this options array into the constructor on instantiation.

```
$docBuild->setOptions(
    [
        'token_refresh' => false, // Default: true
    ]
);

try {
	$docs = $docBuild->getDocuments();
} catch (TokenExpiredException $e) {
	// Have another go
}
```

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance54

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 51.3% 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 ~181 days

Recently: every ~416 days

Total

22

Last Release

306d ago

Major Versions

0.4.0 → 1.0.02018-02-22

1.2.0 → 2.0.02018-11-13

2.0.0 → 3.0.02018-11-16

3.0.2 → 4.02020-12-16

4.0 → 5.02020-12-21

PHP version history (5 changes)0.1.0PHP &gt;=5.3.3

2.0.0PHP &gt;=7.1

4.0PHP &gt;=7.2

5.0PHP &gt;=7.4

5.2.0PHP &gt;=7.4 || &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![leightonthomas](https://avatars.githubusercontent.com/u/14091070?v=4)](https://github.com/leightonthomas "leightonthomas (20 commits)")[![kieljohn](https://avatars.githubusercontent.com/u/1641880?v=4)](https://github.com/kieljohn "kieljohn (8 commits)")[![rcwsr](https://avatars.githubusercontent.com/u/1541207?v=4)](https://github.com/rcwsr "rcwsr (5 commits)")[![Brunty](https://avatars.githubusercontent.com/u/1573273?v=4)](https://github.com/Brunty "Brunty (2 commits)")[![clophie](https://avatars.githubusercontent.com/u/11523339?v=4)](https://github.com/clophie "clophie (2 commits)")[![LewisW](https://avatars.githubusercontent.com/u/17803?v=4)](https://github.com/LewisW "LewisW (2 commits)")

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vivait-docbuild-php/health.svg)

```
[![Health](https://phpackages.com/badges/vivait-docbuild-php/health.svg)](https://phpackages.com/packages/vivait-docbuild-php)
```

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M78](/packages/google-cloud-core)[aimeos/aimeos-base

Aimeos base layer for abstracting from host environments

2.1k134.0k1](/packages/aimeos-aimeos-base)[phpgt/dom

Modern DOM API.

12412.2M17](/packages/phpgt-dom)[razorpay/ifsc

Razorpay IFSC Codes Library

382201.9k](/packages/razorpay-ifsc)[anthropic-ai/sdk

Anthropic PHP SDK

129134.7k5](/packages/anthropic-ai-sdk)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)

PHPackages © 2026

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