PHPackages                             antonythorpe/consumer - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. antonythorpe/consumer

ActiveSilverstripe-vendormodule[Parsing &amp; Serialization](/categories/parsing)

antonythorpe/consumer
=====================

A SilverStripe BulkLoader for consuming external APIs

4.0.1(1y ago)441211MITPHPPHP ^8.1

Since Oct 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AntonyThorpe/consumer)[ Packagist](https://packagist.org/packages/antonythorpe/consumer)[ RSS](/packages/antonythorpe-consumer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (2)Versions (12)Used By (1)

consumer
========

[](#consumer)

A SilverStripe BulkLoader for consuming external APIs

[![CI](https://github.com/AntonyThorpe/consumer/actions/workflows/ci.yml/badge.svg)](https://github.com/AntonyThorpe/consumer/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/3f567679c2f44ad71f0beeca5a5a08fd6f35a3c7dd235ed384172682f18275c6/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e7974686f7270652f636f6e73756d65722f762f737461626c65)](https://packagist.org/packages/antonythorpe/consumer)[![Total Downloads](https://camo.githubusercontent.com/77dfd31d9c026be6ed2d65d3f09527dffc1fdc15ea05049c9669a8a6fb8a5966/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e7974686f7270652f636f6e73756d65722f646f776e6c6f616473)](https://packagist.org/packages/antonythorpe/consumer)[![Latest Unstable Version](https://camo.githubusercontent.com/a29bfe43bf4b878024e3033d6168c9eda5c8bb06d895ad98da738471263d96e4/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e7974686f7270652f636f6e73756d65722f762f756e737461626c65)](https://packagist.org/packages/antonythorpe/consumer)[![License](https://camo.githubusercontent.com/5ad98c5f28f41590a518cec51446ad3b8e5bc0b31ec4c6a3bf65188ecc29b18c/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e7974686f7270652f636f6e73756d65722f6c6963656e7365)](https://packagist.org/packages/antonythorpe/consumer)

Maintain data integrity with an external source of truth. Keep dataobjects up to date with fresh data received from external APIs. Inspired by [burnbright/silverstripe-importexport](https://github.com/burnbright/silverstripe-importexport).

Features
--------

[](#features)

- Retains a record of the maximum last edited date (to use as a limit in future API calls)
- Display, Log and/or email Bulk Loader Results showing the changes made to a dataobject
- Localisation options available for Results report
- Preview setting for dry runs leaving the dataobject untouched

Use Case
--------

[](#use-case)

Where there is an external source of truth that a dataobject needs to be updated from.

An [example](https://github.com/AntonyThorpe/silvershop-unleashed) is an eCommerce website where the product prices need to be kept in alignment with an online inventory system (which is used post-sale to manage fulfilment of an order). With the eCommerce website being a subset of the total inventory items in stock, updating, without creating new product items, is required. The pricing and other properties change frequently. Based upon the philosophy of *entering data only once* a sync from the external source of truth would keep the website accurate, up to date and reduce maintenance.

How to use
----------

[](#how-to-use)

- Subclass `\AntonyThorpe\Consumer\BulkLoader` and set your column map between the external API fields and the dataobject (see docs and tests folder for guidance).
- Create a `BuildTask` to retrieve fresh API data using a tool like [Guzzle](http://docs.guzzlephp.org/en/latest/)
- Alter the dataobject via a method on your BulkLoader subclass
- Review the Bulk Loader Results report
- Create an instance of the `Consumer` class and record the last edited date for future reference
- Setup a cron job to run the `BuildTask` on a regular basis and monitor incoming emails for exceptions

Example
-------

[](#example)

A bulk loader for Silvershop Unleashed Software ([link](https://github.com/AntonyThorpe/silvershop-unleashed))

Requirements
------------

[](#requirements)

- [SilverStripe](http://www.silverstripe.org)

Documentation
-------------

[](#documentation)

[Index](/docs/en/index.md)

Support
-------

[](#support)

None sorry.

Change Log
----------

[](#change-log)

[Link](changelog.md)

Contributing
------------

[](#contributing)

[Link](contributing.md)

License
-------

[](#license)

[MIT](LICENCE)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity78

Established project with proven stability

 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

Every ~312 days

Recently: every ~345 days

Total

10

Last Release

703d ago

Major Versions

1.0.1 → 2.0.02018-07-22

2.0.3 → 3.0.02023-05-24

2.04 → 4.0.02024-06-14

### Community

Maintainers

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

---

Top Contributors

[![AntonyThorpe](https://avatars.githubusercontent.com/u/1023740?v=4)](https://github.com/AntonyThorpe "AntonyThorpe (19 commits)")

---

Tags

bulk-loadersilverstripejsonxmlsilverstripeBulkLoader

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/antonythorpe-consumer/health.svg)

```
[![Health](https://phpackages.com/badges/antonythorpe-consumer/health.svg)](https://phpackages.com/packages/antonythorpe-consumer)
```

###  Alternatives

[phptek/jsontext

JSON storage, querying and modification.

2222.2k2](/packages/phptek-jsontext)[unclecheese/silverstripe-serialised-dbfields

Provides serialised data (YAML, JSON) in text fields that are traverseable as nested ViewableData objects.

106.2k](/packages/unclecheese-silverstripe-serialised-dbfields)

PHPackages © 2026

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