This repo is READ ONLY, in order to contribute to Flow PHP project, please open PR against flow monorepo.
Changes merged to monorepo are automatically propagated into sub repositories.
ETL Adapter that provides Loaders and Extractors that works with Text files. It does not require any external dependencies, it's working on internal PHP functions.
composer require flow-php/etl-adapter-text:1.x@dev
<?php
use Flow\ETL\DSL\Text;
use Flow\ETL\Flow;
$rows = (new Flow())
->read(Text::from(new LocalFile($path)))
->fetch();
⚠️ Heads up, TextLoader expects rows to have single entry in order to properly write them into file.
<?php
use Flow\ETL\DSL\Text;
use Flow\ETL\Row;
use Flow\ETL\Rows;
(new Flow())
->process(
new Rows(
Row::create(new Row\Entry\StringEntry('name', 'Norbert')),
Row::create(new Row\Entry\StringEntry('name', 'Tomek')),
Row::create(new Row\Entry\StringEntry('name', 'Dawid')),
)
)
->load(Text::to($path))
->run();
In order to install dependencies please, launch following commands:
composer install
In order to execute full test suite, please launch following command:
composer build
It's recommended to use pcov for code coverage however you can also use
xdebug by setting XDEBUG_MODE=coverage
env variable.