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

6.0.0(1mo ago)129.7k↑708.3%2MITPHPPHP &gt;=8.3CI passing

Since Jan 30Pushed 1mo ago7 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 3w ago

READMEChangelog (10)Dependencies (6)Versions (24)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

60

—

FairBetter than 98% of packages

Maintenance90

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 50% 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 ~186 days

Recently: every ~490 days

Total

23

Last Release

49d ago

Major Versions

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

5.2.1 → 6.0.02026-05-05

PHP version history (6 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

6.0.0PHP &gt;=8.3

### 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 (9 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

[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M517](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.7k](/packages/contao-core-bundle)[shopware/administration

Administration frontend for the Shopware Core

404.2M105](/packages/shopware-administration)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)

PHPackages © 2026

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