Skip to content

Commit 7216043

Browse files
committed
Moved all Types into dedicated Flow/Types namespace for flow-php/types component
1 parent 6cb819b commit 7216043

262 files changed

Lines changed: 1870 additions & 1334 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.

.github/workflows/monorepo-split.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
split_repository: 'filesystem'
4343
- local_path: 'src/lib/snappy'
4444
split_repository: 'snappy'
45+
- local_path: 'src/lib/types'
46+
split_repository: 'types'
4547

4648
- local_path: 'src/adapter/etl-adapter-avro'
4749
split_repository: 'etl-adapter-avro'

bin/docs.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function execute(InputInterface $input, OutputInterface $output) : int
4747
__DIR__ . '/../src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/functions.php',
4848
__DIR__ . '/../src/adapter/etl-adapter-xml/src/Flow/ETL/Adapter/XML/functions.php',
4949
__DIR__ . '/../src/lib/filesystem/src/Flow/Filesystem/DSL/functions.php',
50+
__DIR__ . '/../src/lib/types/src/Flow/Types/DSL/functions.php',
5051
__DIR__ . '/../src/bridge/filesystem/azure/src/Flow/Filesystem/Bridge/Azure/DSL/functions.php',
5152
__DIR__ . '/../src/bridge/filesystem/async-aws/src/Flow/Filesystem/Bridge/AsyncAWS/DSL/functions.php',
5253
__DIR__ . '/../src/lib/azure-sdk/src/Flow/Azure/SDK/DSL/functions.php',

composer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
"src/lib/parquet-viewer/src/Flow",
123123
"src/lib/parquet/src/Flow",
124124
"src/lib/snappy/src/Flow",
125+
"src/lib/types/src/Flow",
125126
"src/tools/documentation/src/Flow"
126127
],
127128
"Flow\\Doctrine\\Bulk\\": [
@@ -154,6 +155,7 @@
154155
"src/lib/filesystem/src/Flow/Filesystem/DSL/functions.php",
155156
"src/lib/parquet/src/Flow/Parquet/functions.php",
156157
"src/lib/parquet/src/stubs.php",
158+
"src/lib/types/src/Flow/Types/DSL/functions.php",
157159
"src/lib/snappy/polyfill.php"
158160
]
159161
},
@@ -187,6 +189,7 @@
187189
"src/lib/parquet-viewer/tests/Flow",
188190
"src/lib/parquet/tests/Flow",
189191
"src/lib/snappy/tests/Flow",
192+
"src/lib/types/tests/Flow",
190193
"src/tools/documentation/tests/Flow"
191194
],
192195
"Flow\\Doctrine\\Bulk\\Tests\\": [
@@ -227,6 +230,7 @@
227230
"@test:lib:parquet",
228231
"@test:lib:parquet-viewer",
229232
"@test:lib:snappy",
233+
"@test:lib:types",
230234
"@test:bridge:filesystem-azure",
231235
"@test:bridge:filesystem-async-aws",
232236
"@test:bridge:monolog-http",
@@ -276,6 +280,9 @@
276280
"test:lib:snappy": [
277281
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-snappy-integration --log-junit ./var/phpunit/logs/lib-snappy-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/lib-snappy-integration.coverage.xml --coverage-html=./var/phpunit/coverage/html/lib-snappy-integration"
278282
],
283+
"test:lib:types": [
284+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-types-unit --log-junit ./var/phpunit/logs/lib-types-unit.junit.xml --coverage-clover=./var/phpunit/coverage/clover/lib-types-unit.coverage.xml --coverage-html=./var/phpunit/coverage/html/lib-types-unit"
285+
],
279286
"test:bridge:filesystem-azure": [
280287
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-unit --log-junit ./var/phpunit/logs/bridge-filesystem-azure-unit.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-azure-unit.coverage.xml --coverage-html=./var/phpunit/coverage/html/bridge-filesystem-azure-unit",
281288
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-integration --log-junit ./var/phpunit/logs/bridge-filesystem-azure-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-azure-integration.coverage.xml --coverage-html=./var/phpunit/coverage/html/bridge-filesystem-azure-integration"
@@ -403,6 +410,7 @@
403410
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/lib.parquet.xml",
404411
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/lib.parquet-viewer.xml",
405412
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/lib.snappy.xml",
413+
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/lib.types.xml",
406414
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/adapter.chartjs.xml",
407415
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/adapter.csv.xml",
408416
"./tools/phpdocumentor/vendor/bin/phpdoc --config=./phpdoc/adapter.doctrine.xml",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Types
2+
3+
- [⬅️️ Back](../../introduction.md)
4+
5+
## Installation
6+
7+
```
8+
composer require flow-php/types:~--FLOW_PHP_VERSION--
9+
```

examples/topics/data_frame/reorder_columns/code.php

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
str_entry,
1818
struct_entry,
1919
to_stream,
20-
type_float,
21-
type_int,
22-
type_list,
23-
type_map,
24-
type_string,
25-
type_structure,
2620
uuid_entry};
2721

2822
require __DIR__ . '/vendor/autoload.php';
@@ -43,8 +37,8 @@
4337
str_entry('string_b', 'string'),
4438
uuid_entry('uuid', '06143adb-3009-45c8-a4f0-c7016f97cab7'),
4539
json_entry('json', ['id' => 1, 'status' => 'NEW']),
46-
list_entry('list', [1, 2, 3], type_list(type_int())),
47-
map_entry('map', [0 => 'zero', 1 => 'one', 2 => 'two'], type_map(type_int(), type_string())),
40+
list_entry('list', [1, 2, 3], \Flow\Types\DSL\type_list(\Flow\Types\DSL\type_integer())),
41+
map_entry('map', [0 => 'zero', 1 => 'one', 2 => 'two'], \Flow\Types\DSL\type_map(\Flow\Types\DSL\type_integer(), \Flow\Types\DSL\type_string())),
4842
struct_entry(
4943
'struct',
5044
[
@@ -54,14 +48,14 @@
5448
'country' => 'country',
5549
'location' => ['lat' => 1.5, 'lon' => 1.5],
5650
],
57-
type_structure([
58-
'street' => type_string(),
59-
'city' => type_string(),
60-
'zip' => type_string(),
61-
'country' => type_string(),
62-
'location' => type_structure([
63-
'lat' => type_float(),
64-
'lon' => type_float(),
51+
\Flow\Types\DSL\type_structure([
52+
'street' => \Flow\Types\DSL\type_string(),
53+
'city' => \Flow\Types\DSL\type_string(),
54+
'zip' => \Flow\Types\DSL\type_string(),
55+
'country' => \Flow\Types\DSL\type_string(),
56+
'location' => \Flow\Types\DSL\type_structure([
57+
'lat' => \Flow\Types\DSL\type_float(),
58+
'lon' => \Flow\Types\DSL\type_float(),
6559
]),
6660
]),
6761
),

manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@
135135
"name" : "flow-php/snappy",
136136
"path": "src/lib/snappy",
137137
"type": "lib"
138+
},
139+
{
140+
"name" : "flow-php/types",
141+
"path": "src/lib/types",
142+
"type": "lib"
138143
}
139144
]
140145
}

phpdoc/lib.snappy.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
>
77
<title>Flow PHP</title>
88
<paths>
9-
<output>./../web/landing/build/documentation/api/lib/rdls</output>
10-
<cache>./../var/phpdocumentor/cache/lib/rdls</cache>
9+
<output>./../web/landing/build/documentation/api/lib/snappy</output>
10+
<cache>./../var/phpdocumentor/cache/lib/snappy</cache>
1111
</paths>
1212
<version number="1.x">
1313
<api format="php">
1414
<source dsn="./../">
15-
<path>src/lib/rdls/src</path>
15+
<path>src/lib/snappy/src</path>
1616
</source>
17-
<output>rdls</output>
17+
<output>snappy</output>
1818
<default-package-name>Snappy</default-package-name>
1919
<visibility>public</visibility>
2020
<include-source>false</include-source>

phpdoc/lib.types.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<phpdocumentor
3+
configVersion="3"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns="https://www.phpdoc.org"
6+
>
7+
<title>Flow PHP</title>
8+
<paths>
9+
<output>./../web/landing/build/documentation/api/lib/types</output>
10+
<cache>./../var/phpdocumentor/cache/lib/types</cache>
11+
</paths>
12+
<version number="1.x">
13+
<api format="php">
14+
<source dsn="./../">
15+
<path>src/lib/types/src</path>
16+
</source>
17+
<output>types</output>
18+
<default-package-name>Types</default-package-name>
19+
<visibility>public</visibility>
20+
<include-source>false</include-source>
21+
</api>
22+
</version>
23+
<setting name="template.color" value="orange"/>
24+
</phpdocumentor>

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ parameters:
4646
- src/lib/parquet/src
4747
- src/lib/parquet-viewer/src
4848
- src/lib/snappy/src
49+
- src/lib/types/src
4950
- src/tools/documentation/src
5051
- src/core/etl/tests
5152
- src/cli/tests

phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@
7575
<testsuite name="snappy-integration">
7676
<directory>src/lib/snappy/tests/Flow/Snappy/Tests/Integration</directory>
7777
</testsuite>
78+
<testsuite name="types-unit">
79+
<directory>src/lib/types/tests/Flow/Types/Tests/Unit</directory>
80+
</testsuite>
7881
<testsuite name="bridge-filesystem-azure-unit">
7982
<directory>src/bridge/filesystem/azure/tests/Flow/Filesystem/Bridge/Azure/Tests/Unit</directory>
8083
</testsuite>

0 commit comments

Comments
 (0)