Skip to content

Conversation

@norberttech
Copy link
Member

@norberttech norberttech commented May 12, 2025

Change Log

Added

  • UnionType to Types
  • OptionalType to Types
  • nullable property to Schema\Definition

Fixed

Changed

  • Moved all Types related classes to flow-php/types component

Removed

  • nullable property from all types

Deprecated

Security


Description

Resolves: #1628

@github-actions
Copy link
Contributor

github-actions bot commented May 12, 2025

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| benchmark             | subject           | revs | its | mem_peak        | mode             | rstdev          |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.894mb -3.41%  | 608.341ms -0.75% | ±1.11% +14.11%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 5.469mb -9.11%  | 1.275s -4.57%    | ±0.29% +504.73% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.491mb -0.25% | 946.807ms +0.95% | ±2.39% +375.48% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.618mb -3.61%  | 38.541ms -2.74%  | ±0.82% +23.78%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.593mb -3.28%  | 601.054ms -0.35% | ±0.31% -58.42%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                       | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench     | bench_transform_10k_rows | 1    | 3   | 127.415mb -3.32% | 65.447ms -5.77% | ±0.45% +51.58% |
| RenameEachEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 19.163mb -3.72%  | 71.639ms -3.16% | ±1.18% +69.77% |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 64.061mb -2.61%  | 85.558ms -18.27% | ±1.36% +142.80% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.093mb -5.27%  | 95.151ms -2.54%  | ±0.60% +220.31% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 166.576mb -0.74% | 20.828s -0.92%   | ±0.18% +99.27%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 18.150mb -2.17%  | 31.291ms +1.87%  | ±1.01% +129.59% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+-------------------+------------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode              | rstdev           |
+-------------------+----------------------------+------+-----+------------------+-------------------+------------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.526mb -3.59% | 650.336ms -10.15% | ±1.42% +276.43%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.036mb -3.54%  | 327.250ms -11.49% | ±1.02% +210.80%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.814mb -3.22%  | 68.133ms -14.16%  | ±0.39% -42.27%   |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 97.079mb -3.85%  | 3.508ms -8.71%    | ±2.33% +76.74%   |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.436mb -3.26% | 237.157ms +29.02% | ±1.23% +21.29%   |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 97.156mb -3.83%  | 23.673ms +22.85%  | ±0.52% -73.02%   |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.954mb -3.82%  | 1.567ms -24.44%   | ±1.51% -23.81%   |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.954mb -3.82%  | 1.531ms -23.38%   | ±3.05% +3060.20% |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.115mb -3.89%  | 3.385ms -32.77%   | ±1.76% -29.18%   |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.644mb -3.87%  | 17.084ms +2.61%   | ±1.18% -41.69%   |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.644mb -3.87%  | 17.232ms +1.00%   | ±1.01% +5.19%    |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.335mb -3.92%  | 2.000μs +0.30%    | ±0.00% -100.00%  |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.335mb -3.92%  | 0.400μs 0.00%     | ±0.00% 0.00%     |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.553mb -3.73% | 14.695ms -1.05%   | ±1.73% -36.61%   |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.620mb -3.37% | 66.877ms -9.31%   | ±0.98% +174.63%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.164mb -3.85%  | 1.150ms -40.97%   | ±2.92% +14.13%   |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.535mb -3.72% | 60.361ms -5.13%   | ±0.17% -69.70%   |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.216mb -3.81%  | 3.413ms -12.85%   | ±0.72% -59.35%   |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.698mb -3.91%  | 39.897ms -2.39%   | ±0.98% +105.17%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.698mb -3.91%  | 40.883ms +1.76%   | ±0.79% -50.40%   |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.698mb -3.91%  | 41.170ms +1.08%   | ±1.20% +123.69%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.776mb -3.82%  | 8.078ms -3.56%    | ±0.43% -66.83%   |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.526mb -3.91%  | 29.411ms -2.17%   | ±0.41% -35.22%   |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.335mb -3.92%  | 13.394μs -3.38%   | ±0.35% -87.14%   |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.335mb -3.92%  | 15.717μs +2.17%   | ±3.13% +124.66%  |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.437mb -3.26% | 237.940ms +25.55% | ±0.40% -56.95%   |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 44.061mb -4.63%  | 421.213ms -9.69%  | ±0.61% -51.08%   |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.870mb -3.96%  | 85.986ms -8.28%   | ±0.70% +153.68%  |
+-------------------+----------------------------+------+-----+------------------+-------------------+------------------+

@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.26%. Comparing base (a5dbefe) to head (37115a0).
Report is 3 commits behind head on 1.x.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1645      +/-   ##
==========================================
- Coverage   83.30%   82.26%   -1.04%     
==========================================
  Files         707      694      -13     
  Lines       19144    18852     -292     
==========================================
- Hits        15947    15508     -439     
- Misses       3197     3344     +147     
Components Coverage Δ
etl 88.04% <ø> (+1.63%) ⬆️
cli 84.59% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 90.11% <ø> (ø)
lib-filesystem 78.02% <ø> (ø)
lib-parquet 84.37% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-snappy 91.16% <ø> (+0.46%) ⬆️
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 74.41% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 89.69% <ø> (-0.05%) ⬇️
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 80.00% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 78.42% <ø> (-2.43%) ⬇️
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (-0.05%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norberttech norberttech force-pushed the 1628-make-flow-types-fully-compatible-with-static-analysis-tools branch 2 times, most recently from e5b6d38 to 96500e5 Compare May 13, 2025 09:32
@norberttech norberttech force-pushed the 1628-make-flow-types-fully-compatible-with-static-analysis-tools branch 5 times, most recently from 83075e4 to a5988fe Compare May 16, 2025 09:14
@norberttech norberttech force-pushed the 1628-make-flow-types-fully-compatible-with-static-analysis-tools branch from a5988fe to 071cfec Compare May 16, 2025 10:20
@norberttech norberttech marked this pull request as ready for review May 16, 2025 17:27
@norberttech norberttech merged commit e44b312 into 1.x May 16, 2025
22 of 23 checks passed
@norberttech norberttech deleted the 1628-make-flow-types-fully-compatible-with-static-analysis-tools branch May 16, 2025 17:55
@norberttech norberttech added this to the 0.17.0 milestone May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Flow Types fully compatible with Static Analysis Tools

3 participants