Extract, Transform, Load.
PHP-ETL is the go-to library for executing complex data import, export, and transformation tasks within PHP applications, with seamless Symfony and Sylius integrations.
$ composer require oliverde8/php-etl
Why PHP-ETL?
A standardized approach for handling complex data tasks, without locking you into a rigid framework.
Composable Chains
Split, Merge, Repeat, and FailSafe operations let you build complex pipelines out of small, reusable pieces.
Asynchronous Operations
API calls and other long-running tasks can run in parallel without blocking the rest of the chain.
Multi-Source I/O
Read and write CSV and JSON, or reach remote files over SFTP, S3, and more via Flysystem.
Rule Engine
Shape and transform data declaratively with a flexible rule engine, no custom transformer code required.
Framework-Agnostic
Use it standalone, or drop into Symfony and Sylius with bundle integrations.
Auto-Generated Diagrams
Visualize any chain as a Mermaid flowchart, generated straight from your configuration.
Fail-Safe by Design
Wrap operations in retryable, exception-catching sub-chains without extra plumbing.
Traceable Executions
Keep a clear history of processed files, so nothing important gets silently lost.
Works With Your Stack
See It In Action
Define a chain in PHP, get a flowchart for free β generated automatically from your configuration. Hereβs a chain that splits subscribed customers into their own file while still writing everyone to the main export:
$chainConfig = (new ChainConfig())
->addLink(new CsvExtractConfig())
->addLink((new ChainSplitConfig())
->addSplit((new ChainConfig())
->addLink(new FilterDataConfig([
['get' => ['field' => 'IsSubscribed']]
]))
->addLink(new CsvFileWriterConfig('subscribed.csv'))
)
)
->addLink(new CsvFileWriterConfig('all-customers.csv'));
$chainProcessor = $chainBuilder->createChain($chainConfig);
$chainProcessor->process($input, []);
flowchart TD
A[Extract CSV] --> B{Split}
B --> C[Filter: Subscribed]
C --> D[Write subscribed.csv]
B --> E[Write all-customers.csv]
Real chains can get a lot more involved β see the cookbook for real-world examples like API pagination and nested sub-chains.
Ready to get started?
Install PHP-ETL and have your first chain running in a few minutes.