Skip to content

Commit 72208ec

Browse files
committed
Remove multiple path support in from_avro() function
Don't validate it due to lack of support
1 parent c9b0c62 commit 72208ec

3 files changed

Lines changed: 4 additions & 17 deletions

File tree

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ parameters:
6161
- src/cli/src/Flow/CLI/Command/*
6262
- src/core/etl/src/Flow/ETL/Formatter/ASCII/ASCIITable.php
6363
- src/core/etl/src/Flow/ETL/Sort/ExternalSort/RowsMinHeap.php
64+
- src/adapter/etl-adapter-avro/*
6465
- src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchResults.php
6566
- src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchParams.php
6667
- src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/PointInTime.php

src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/functions.php

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,13 @@
44

55
namespace Flow\ETL\DSL\Adapter\Avro;
66

7-
use function Flow\ETL\DSL\from_all;
87
use Flow\ETL\Adapter\Avro\FlixTech\{AvroExtractor, AvroLoader};
9-
use Flow\ETL\{Attribute\DocumentationDSL, Attribute\Module, Attribute\Type, Extractor, Schema};
8+
use Flow\ETL\{Attribute\DocumentationDSL, Attribute\Module, Attribute\Type, Schema};
109
use Flow\Filesystem\Path;
1110

1211
#[DocumentationDSL(module: Module::AVRO, type: Type::EXTRACTOR)]
13-
function from_avro(Path|string|array $path) : Extractor
12+
function from_avro(Path|string $path) : AvroExtractor
1413
{
15-
if (\is_array($path)) {
16-
/** @var array<Extractor> $extractors */
17-
$extractors = [];
18-
19-
foreach ($path as $next_path) {
20-
$extractors[] = new AvroExtractor(
21-
\is_string($next_path) ? Path::realpath($next_path) : $next_path,
22-
);
23-
}
24-
25-
return from_all(...$extractors);
26-
}
27-
2814
return new AvroExtractor(
2915
\is_string($path) ? Path::realpath($path) : $path
3016
);

web/landing/resources/dsl.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)