Skip to content

Commit 65b2c67

Browse files
authored
1595 cleanup schema namespace (#1599)
* Removed legacy SchemaMatcher * Cleaned up Flow\ETL\Schema namespace * Updated dsl definitions
1 parent 46d69ed commit 65b2c67

83 files changed

Lines changed: 143 additions & 480 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

documentation/upgrading.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ Please follow the instructions for your specific version to ensure a smooth upgr
55

66
---
77

8+
## Upgrading from 0.14.x to 0.15.x
9+
10+
### 1) Removed `Flow\ETL\Row\Schema\Matcher` and implementations
11+
Schema Matcher was the initial attempt to implement a schema evolution next to schema validation that over
12+
time got replaced with different implementation of Schema Validator.
13+
14+
### 2) Renamed `Flow\ETL\Row\Schema` namespace into `Flow\ETL\Schema`.
15+
This means all classes related to Schema now live under `Flow\ETL\Schema` namespace.
16+
17+
---
18+
819
## Upgrading from 0.11.x to 0.14.x
920

1021
### 1) Replaced `Flow\ETL\DataFrame::validate()` with `Flow\ETL\DataFrame::match()`

rector.tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
use Flow\ETL\Row\Entry\UuidEntry;
4848
use Flow\ETL\Row\Entry\XMLElementEntry;
4949
use Flow\ETL\Row\Entry\XMLEntry;
50-
use Flow\ETL\Row\Schema;
51-
use Flow\ETL\Row\Schema\Definition;
50+
use Flow\ETL\Schema;
51+
use Flow\ETL\Schema\Definition;
5252
use Flow\ETL\Rows;
5353
use Flow\Tools\Rector\NewObjectToFunction;
5454
use Flow\Tools\Rector\NewToFunctionCallRector;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Flow\ETL\{Exception\RuntimeException, FlowContext, Loader, Rows};
88
use Flow\ETL\Loader\Closure;
9-
use Flow\ETL\Row\Schema;
9+
use Flow\ETL\Schema;
1010
use Flow\Filesystem\Path;
1111

1212
final readonly class AvroLoader implements Closure, Loader, Loader\FileLoader

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
use function Flow\ETL\DSL\from_all;
88
use Flow\ETL\Adapter\Avro\FlixTech\{AvroExtractor, AvroLoader};
9-
use Flow\ETL\Extractor;
10-
use Flow\ETL\Row\Schema;
9+
use Flow\ETL\{Extractor, Schema};
1110
use Flow\Filesystem\Path;
1211

1312
function from_avro(Path|string|array $path) : Extractor

src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use function Flow\ETL\DSL\array_to_rows;
88
use Flow\ETL\{Exception\InvalidArgumentException, Extractor, FlowContext};
99
use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PathFiltering, Signal};
10-
use Flow\ETL\Row\Schema;
10+
use Flow\ETL\Schema;
1111
use Flow\Filesystem\Path;
1212

1313
final class CSVExtractor implements Extractor, FileExtractor, LimitableExtractor

src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Attribute\Module,
1111
Attribute\Type as DSLType
1212
};
13-
use Flow\ETL\Row\Schema;
13+
use Flow\ETL\Schema;
1414
use Flow\Filesystem\{Path, SourceStream};
1515

1616
/**

src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use function Flow\ETL\DSL\df;
88
use Doctrine\DBAL\{Connection, DriverManager};
9-
use Flow\ETL\{DataFrame, DataFrameFactory, Row\Schema, Rows};
9+
use Flow\ETL\{DataFrame, DataFrameFactory, Rows, Schema};
1010

1111
final class DbalDataFrameFactory implements DataFrameFactory
1212
{

src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLimitOffsetExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Doctrine\DBAL\Connection;
99
use Doctrine\DBAL\Query\QueryBuilder;
1010
use Flow\ETL\Exception\InvalidArgumentException;
11-
use Flow\ETL\{Extractor, FlowContext, Row\Schema};
11+
use Flow\ETL\{Extractor, FlowContext, Schema};
1212

1313
final class DbalLimitOffsetExtractor implements Extractor
1414
{

src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Flow\ETL\Adapter\Doctrine;
66

7-
use Flow\ETL\Row\Schema\Metadata;
7+
use Flow\ETL\Schema\Metadata;
88

99
enum DbalMetadata : string
1010
{

src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalQueryExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use function Flow\ETL\DSL\array_to_rows;
88
use Doctrine\DBAL\{ArrayParameterType, Connection, ParameterType};
99
use Doctrine\DBAL\Types\Type;
10-
use Flow\ETL\{Extractor, FlowContext, Row\Schema};
10+
use Flow\ETL\{Extractor, FlowContext, Schema};
1111

1212
final class DbalQueryExtractor implements Extractor
1313
{

0 commit comments

Comments
 (0)