Download the PHP package simsoft/data-flow without Composer
On this page you can find all versions of the php package simsoft/data-flow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simsoft/data-flow
More information about simsoft/data-flow
Files in simsoft/data-flow
Package data-flow
Short Description A lightweight, composable ETL (Extract, Transform, Load) pipeline library for PHP with fluent API, spreadsheet support, and flow control.
License MIT
Informations about the package data-flow
Simsoft DataFlow
A lightweight, composable ETL pipeline library for PHP 8.3+
DataFlow helps you move data from one place to another — read from a source (database, CSV, API), transform it (filter, map, validate, enrich), and write it to a destination (database, spreadsheet, file). This pattern is called ETL (Extract, Transform, Load) and is the backbone of data migration, reporting, syncing, and batch processing.
With DataFlow, you describe your pipeline as a fluent chain:
No framework required. No external services. Just PHP.
Why This Library
- Fluent, composable API — chain extractors, transformers, and loaders in a single readable expression
- Built-in resilience — retry with exponential backoff + jitter, circuit breaker, and checkpoint/resume without external dependencies
- Zero-overhead opt-in — every resilience feature uses the null object pattern; disabled features cost nothing at runtime
- Generator-based streaming — constant memory footprint regardless of dataset size, with dead-letter retention capped so bulk failures stay bounded too (details)
- Per-stage error strategies — configure Skip, Retry, Throw, or LogAndContinue independently on each stage
- Crash recovery — checkpoint/resume enables long-running pipelines to recover from failures without reprocessing from scratch
- Circuit breaker — prevents cascading failures when downstream services degrade, a pattern common in microservices (Resilience4j, Polly) but unique among PHP ETL libraries
- Dead letter collection — failed and circuit-open rows are captured with full context for inspection or reprocessing
- Inline schema validation — validate row data with pipe-delimited rules ( Laravel-style syntax) without leaving the pipeline
- Real-time metrics — pluggable MetricsExporter interface for emitting events to logging, StatsD, Prometheus, or custom systems
- Dry-run mode — validate entire pipelines without performing actual writes
Install
Basic Usage
Example using extract, transform and load.
Limit
Limit data output.
Filter
Filter method help you to filter the data.
Chunk
Splitting data into smaller, manageable parts of a fixed size
Mapping
Mapping method allow you to convey the data to another format. Original keys are preserved; mapped keys are added or overwritten.
Set New Map
setNewMap() converts source data into a completely new array containing only
the mapped keys. Unlike map() which merges into the existing row,
setNewMap() discards all original keys.
map() vs setNewMap()
map() |
setNewMap() |
|
|---|---|---|
| Original keys | Preserved | Discarded |
| Result contains | All original keys + mapped keys | Only mapped keys |
| Use case | Add/rename columns while keeping the rest | Reshape into a new structure, drop unwanted fields |
Preview
preview() is a debugging helper that limits the pipeline to N rows and dumps
each row's key and value. Use it to inspect the data structure at any point in
the pipeline.
Insert preview() at any point to understand the data shape before writing the
next stage.
Flow Continuation
Connecting flows into a chain.
Pipeline Result
Every run() call returns a PipelineResult with execution metadata.
Error Handling
Configure per-stage error strategies for production resilience.
Available strategies: Throw (default), Skip, Retry, LogAndContinue.
Dry-Run Mode
Validate pipelines without performing actual writes.
Logging & Progress
Inject a PSR-3 logger and track progress on large datasets.
New to ETL or to this library? Start with Quick Start — install, first pipeline, and how to inspect one when it misbehaves.
Advanced Usage
- Using Closure
- Useful Processors
- Customized ETL Processor
- Create Reusable Data Flow
- Using Payload
- Macro & Mixin
- Error Handling
- Observability & Metrics
- Dry-Run Mode
- Schema Validation
- Circuit Breaker
- Checkpoint & Resume
- Metrics Exporter
- Spreadsheet (PhpSpreadsheet)
Releasing
Maintainers: see RELEASING.md for the release checklist. (It is excluded from the installed package, hence the absolute link.) After publishing, verify the release the way a user installs it:
License
The Simsoft DataFlow is licensed under the MIT License. See the LICENSE file for details