PHPackages                             bellows/pvc - 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. bellows/pvc

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

bellows/pvc
===========

Used to facilitate easy batch processing by creating data pipelines

v0.1.0(6y ago)12.4kMITPHP

Since Aug 25Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (5)Used By (0)

PVC
===

[](#pvc)

This PHP library should be used to optimize batched data flow. It was created with the idea with reducing the number of round trips to and from a database or web api.

Collect:
--------

[](#collect)

PVC is built with batches in mind. If reduction in round trips is what you need, then you need to make your payload bigger. Instead of querying an api one record at a time, PVC makes it easier to group objects for a payload

```
# Batch operations of 40

$pipeline = new \Pvc\Pipeline;

$pipeline->collect(40, function($batch) {
	echo "Batch size: ".count($batch)."\n";
});

for ($i = 0; $i < 100; $i++) {
	$pipeline->push($i);
}
$pipeline->flush();

// Batch size: 40
// Batch size: 40
// Batch size: 20
```

Branch
------

[](#branch)

If you have data that needs to be split into more than one pathway, PVC can help.

```
# Branched batches

$pipeline = new \Pvc\Pipeline;
$pipeline
	->branch('switch', function($datum) {
		return $datum['type'];
	})
	// the second argument is always the path this data took
	->collect(30, function($data, $path) {
		echo "For type ".$path['switch'].": ".count($data)." records\n";
	});

$type = 0;
for ($i = 0; $i < 100; $i++) {
	$pipeline->push(['type' => ($type++) % 3, 'id' => $i ]);
};
$pipeline->flush();

// For type 0: 30
// For type 1: 30
// For type 2: 30
// For type 0: 4
// For type 1: 3
// For type 2: 3
```

Transform
---------

[](#transform)

Transforming data mid way may be useful for your application, so PVC provides a `transform` operation, which allows you to change the data mid-stream.

```
$pipeline = new \Pvc\Pipeline;
$pipeline->transform(function($data) use (&$lookupTable) {
	return $lookupTable[$data->getId()];
});
```

Filter
------

[](#filter)

You can filter out undesirable or irrelevant data with the use of the `filter` operation.

```
$pipeline = new \Pvc\Pipeline;
$pipeline->filter(function($data) use (&$lookupTable) {
	return $data instanceof GoodData;
});
```

Expand
------

[](#expand)

The opposite of collect. When the data in your stream is an array, `expand` will iterate over that array and make subsequent operations treat that data

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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.

###  Release Activity

Cadence

Every ~400 days

Total

4

Last Release

2352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87d4befca0c61cbbeceb643038d809c659d3f13b34281dbf9456f712f6806f73?d=identicon)[oranj](/maintainers/oranj)

---

Top Contributors

[![oranj](https://avatars.githubusercontent.com/u/1034204?v=4)](https://github.com/oranj "oranj (11 commits)")

### Embed Badge

![Health badge](/badges/bellows-pvc/health.svg)

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

###  Alternatives

[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)

PHPackages © 2026

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