PHPackages                             tmanley1985/php-transducers - 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. tmanley1985/php-transducers

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

tmanley1985/php-transducers
===========================

An implementation of transducers for php

v1.0.1(2y ago)15MITPHPPHP ^8.0

Since Jun 8Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

PHP Transducers
===============

[](#php-transducers)

An implementation of transducers in php

About
-----

[](#about)

Transducers allow you to compose map and filter operations without the need for intermediate data structures by composing reducing functions (reducers). They're like a factory for reducing functions. Whenever you run a map or filter operation, you're creating a new intermediate data structure which is usually negligible, but as the size of your input scales, so do these operations.

True transducers should be able to operate on multiple data structures: trees, streams, arrays, etc. This library only operates on arrays.

I've created two videos as part of a larger series on the reduce method on youtube. All examples are in es6:

1. [Transducers: Mapping](https://youtu.be/ywtYDInYPKc)
2. [Transducers: Filtering](https://youtu.be/aX1HgyG5o60)

TOC
---

[](#toc)

- [Installation](#installation)
- [Usage](#usage)
- [Versioning](#versioning)
- [License](#license)

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

[](#installation)

First:

```
composer require tmanley1985/php-transducers

```

Usage
-----

[](#usage)

```
use TManley1985\PhpTransducers\TransducibleCollection;

TransducibleCollection::fromValues([10,11,12,13])
    ->transMap(fn ($num) => $num + 1)
    ->transFilter(fn ($num) => $num % 2 === 0)
    ->transduce(); // [12,14]
```

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning.

License
-------

[](#license)

This project is licensed under the MIT License

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~0 days

Total

2

Last Release

1067d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51aaedc349017202cfbcee5286f9ae5269bf03ced8d1f8d047320bb3fae1c3a3?d=identicon)[tmanley1985](/maintainers/tmanley1985)

---

Top Contributors

[![tmanley1985](https://avatars.githubusercontent.com/u/6201010?v=4)](https://github.com/tmanley1985 "tmanley1985 (15 commits)")

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/tmanley1985-php-transducers/health.svg)

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

###  Alternatives

[phmlabs/annovent

Simple lightweight event dispatcher using annotations for registering listeners

113.3k](/packages/phmlabs-annovent)

PHPackages © 2026

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