Skip to content

Commit

Permalink
Fixed phar build
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Feb 3, 2024
1 parent 1bf510b commit fbfcf34
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: "Validate Flow PHAR"
run: |
./build/flow.phar --version
./build/flow.phar run examples/topics/transformations/array_expand.php
./build/flow.phar run examples/topics/phar/data_frame/code.php
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
23 changes: 23 additions & 0 deletions examples/topics/phar/data_frame/code.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

use function Flow\ETL\DSL\array_entry;
use function Flow\ETL\DSL\array_expand;
use function Flow\ETL\DSL\df;
use function Flow\ETL\DSL\from_rows;
use function Flow\ETL\DSL\int_entry;
use function Flow\ETL\DSL\ref;
use function Flow\ETL\DSL\row;
use function Flow\ETL\DSL\rows;
use function Flow\ETL\DSL\to_output;

// flow.phar run examples/topics/phar/data_frame/code.php

return df()
->read(from_rows(rows(
row(int_entry('id', 1), array_entry('array', ['a' => 1, 'b' => 2, 'c' => 3])),
)))
->write(to_output(false))
->withEntry('expanded', array_expand(ref('array')))
->write(to_output(false));

0 comments on commit fbfcf34

Please sign in to comment.