Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ArrayPushTransformer & CallbackEntryTransformer #525

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/core/etl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ Adapters might also define some custom transformers.
* [array keys style converter](src/Flow/ETL/Transformer/ArrayKeysStyleConverterTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/ArrayKeysStyleConverterTransformerTest.php)
* [array sort](src/Flow/ETL/Transformer/ArraySortTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/ArraySortTransformerTest.php)
* **Callback** - *Might come with performance degradation*
* [callback entry](src/Flow/ETL/Transformer/CallbackEntryTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/CallbackEntryTransformerTest.php)
* [callback row](src/Flow/ETL/Transformer/CallbackRowTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php)

Some transformers come with complex configuration, please find more details [here](/docs/complex_transformers.md).
Expand Down
33 changes: 0 additions & 33 deletions src/core/etl/src/Flow/ETL/DSL/Transform.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Flow\ETL\Exception\RuntimeException;
use Flow\ETL\Row;
use Flow\ETL\Row\Entries;
use Flow\ETL\Row\Entry;
use Flow\ETL\Row\Factory\NativeEntryFactory;
use Flow\ETL\Row\Reference;
use Flow\ETL\Row\Schema;
Expand Down Expand Up @@ -46,8 +45,6 @@ final public static function add_json_object(string $name, array $data) : Transf
}

/**
* @param string $array_column
* @param string $style
* @param ?Schema $schema Desired schema of unpacked elements. Elements not found in schema will be auto detected.
* It is allowed to provide definitions only for selected elements, like for example
* when converting enum string value into specific Enum.
Expand All @@ -67,35 +64,11 @@ final public static function array_convert_keys(string $array_column, string $st
);
}

/**
* Pushes static values into existing array entry, if array entry does not exist, this transformer
* will create one.
*
* @param string $array_entry
* @param array<mixed> $values
*
* @return Transformer
*/
final public static function array_push(string $array_entry, array $values = []) : Transformer
{
return new Transformer\ArrayPushTransformer($array_entry, $values);
}

final public static function array_sort(string $array_name, int $sort_flag = \SORT_REGULAR) : Transformer
{
return new Transformer\ArraySortTransformer($array_name, $sort_flag);
}

/**
* @psalm-param callable(Entry $entry) : Entry ...$callables
*
* @param callable(Entry $entry) : Entry ...$callables
*/
final public static function callback_entry(callable ...$callables) : Transformer
{
return new Transformer\CallbackEntryTransformer(...$callables);
}

/**
* @param callable(Row) : Row $callable
*/
Expand Down Expand Up @@ -151,12 +124,6 @@ public static function rename_all_case(bool $upper = false, bool $lower = false,
return new Transformer\RenameAllCaseTransformer($upper, $lower, $ucfirst, $ucwords);
}

/**
* @param string $search
* @param string $replace
*
* @return Transformer
*/
public static function rename_str_replace_all(string $search, string $replace) : Transformer
{
return new Transformer\RenameStrReplaceAllEntriesTransformer($search, $replace);
Expand Down
63 changes: 0 additions & 63 deletions src/core/etl/src/Flow/ETL/Transformer/ArrayPushTransformer.php

This file was deleted.

90 changes: 0 additions & 90 deletions src/core/etl/src/Flow/ETL/Transformer/CallbackEntryTransformer.php

This file was deleted.

This file was deleted.

This file was deleted.

Loading