PHPackages                             fr3on/php-etl - 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. fr3on/php-etl

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

fr3on/php-etl
=============

A typed, lazy PHP 8.4+ data pipeline / ETL library.

0.0.2(3mo ago)0220MITPHPPHP &gt;=8.4CI passing

Since Apr 13Pushed 3mo agoCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

php-etl
=======

[](#php-etl)

A modern, typed, and lazy PHP 8.4+ data pipeline library.

`php-etl` is a high-performance ETL (Extract, Transform, Load) library designed to handle massive datasets with a constant memory footprint. Using PHP Generators under the hood, it processes data row-by-row, ensuring even the largest pipelines remain memory-safe.

Features
--------

[](#features)

- **Lazy Evaluation**: Entirely stream-based using Generators. Never materialize large arrays again.
- **Typed Pipelines**: Full support for PHPStan generics (`Pipeline`).
- **High-Performance Extractors**: Built-in support for **CSV** and **JSON Lines** (ndjson) with zero memory overhead.
- **Batching &amp; Chunking**: Efficiently process rows in batches using `chunk($size)` or `batch($size)`.
- **Fluent API**: Modern entry point via `Pipeline::create()`.
- **Error Resilience**: Configurable error policies (`COLLECT`, `SKIP`, `THROW`) to manage row-level failures.
- **Bulk Loading**: Built-in `BulkPdoLoader` for high-performance database inserts.
- **Zero Dependencies**: Lightweight core with no runtime dependencies.

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

[](#installation)

```
composer require fr3on/php-etl
```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use Fr3on\Etl\Pipeline;
use Fr3on\Etl\Extractor\CsvExtractor;
use Fr3on\Etl\Sink\CallbackSink;

Pipeline::create()
    ->extract(new CsvExtractor('transactions.csv'))
    ->filter(fn($row) => $row['status'] === 'SUCCESS')
    ->map(fn($row) => ['id' => $row['tx_id'], 'amt' => (float)$row['amount']])
    ->into(new CallbackSink(fn($row) => print_r($row)))
    ->run();
```

### Bulk Loading Example

[](#bulk-loading-example)

```
use Fr3on\Etl\Loader\BulkPdoLoader;

Pipeline::create()
    ->extract(new CsvExtractor('large_data.csv'))
    ->chunk(1000)
    ->load(new BulkPdoLoader($pdo, 'target_table'))
    ->run();
```

Performance
-----------

[](#performance)

`php-etl` is built for extreme efficiency. Benchmarks on 100,000 rows demonstrate sub-second processing with a constant memory footprint.

ExtractorThroughputPeak MemoryTime (100k rows)**JsonExtractor (JSONL)****~1,080,000 rows/sec****~2.0 MB****91 ms****CsvExtractor****~730,000 rows/sec****~2.0 MB****136 ms***Benchmarks run on standard hardware (PHP 8.4, Opcache off). Results may vary depending on row complexity.*

Testing &amp; Benchmarking
--------------------------

[](#testing--benchmarking)

The core library is tested for memory safety and high throughput.

```
composer test         # Run PHPUnit
composer test:memory  # Run with strict 32M memory limit
composer analyse      # Run PHPStan Level 9
composer bench        # Run PHPBench
```

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance81

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Total

2

Last Release

99d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/205356416?v=4)[fr3onv](/maintainers/fr3onv)[@fr3onv](https://github.com/fr3onv)

---

Top Contributors

[![fr3on](https://avatars.githubusercontent.com/u/26393383?v=4)](https://github.com/fr3on "fr3on (7 commits)")

---

Tags

etlgeneratorslazyphpphp84pipelinetypedlazygeneratorsetlpipelinetypedphp84

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fr3on-php-etl/health.svg)

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

###  Alternatives

[laracasts/generators

Advanced Laravel generators, that include schema information.

2.4k6.5M44](/packages/laracasts-generators)[league/pipeline

A plug and play pipeline implementation.

1.0k17.2M88](/packages/league-pipeline)[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.5M28](/packages/rubix-ml)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

378604.0k107](/packages/flow-php-etl)[laracademy/generators

This package will generate a Laravel Model based on your database table itself, filling in the required fields automatically.

360365.9k4](/packages/laracademy-generators)[stolz/assets

An ultra-simple-to-use assets management library

289531.9k8](/packages/stolz-assets)

PHPackages © 2026

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