Skip to content

Conversation

@norberttech
Copy link
Member

@norberttech norberttech commented Jan 6, 2025

Change Log

Added

Fixed

Changed

  • Replaced jawira/case-converter with symfony/string
  • Removed redundant String Style class

Removed

Deprecated

Security


Description

This is just one of a few PRs related to #1316

We ended up with less style-converting cases but I don't believe anyone was using any of them anyway.

The goal of this PR is to mainly bring symfony/string dependency to the project so it can be later used to create more scalar functions

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 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.756mb -0.12%  | 513.723ms -0.49% | ±0.22% -84.94%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.864mb -0.12%  | 1.095s +0.37%    | ±1.05% -22.48%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.500mb -0.01% | 917.250ms +2.62% | ±0.55% +173.92% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.489mb -0.13%  | 32.380ms +0.40%  | ±2.67% +518.82% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.465mb -0.13%  | 688.229ms +2.09% | ±1.93% +79.80%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 108.485mb -0.01% | 58.941ms +0.80% | ±2.08% +148.19% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.031mb -0.01%  | 116.146ms -2.70% | ±1.11% -22.11%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 82.576mb -0.01%  | 106.445ms -1.24% | ±0.46% -73.47%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 166.998mb -0.00% | 20.191s +4.24%   | ±1.99% +554.51% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.074mb -0.03%  | 42.663ms -2.85%  | ±0.15% -88.17%  |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 80.261mb -0.01%  | 3.680ms +15.75%  | ±2.84% +263.50% |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 97.535mb -0.01%  | 180.415ms +0.07% | ±0.63% +132.10% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 80.255mb -0.01%  | 18.050ms -0.02%  | ±1.40% +222.04% |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 81.135mb -0.01%  | 1.947ms +25.13%  | ±0.43% -79.26%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 81.135mb -0.01%  | 1.958ms +26.95%  | ±1.57% +207.19% |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 79.296mb -0.01%  | 3.740ms +6.55%   | ±0.26% -82.14%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 79.825mb -0.01%  | 14.873ms -0.67%  | ±1.69% +83.94%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 79.825mb -0.01%  | 14.875ms +0.12%  | ±0.87% +10.63%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 78.517mb -0.01%  | 1.806μs +0.68%   | ±2.57% -3.64%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 78.517mb -0.01%  | 0.300μs -25.00%  | ±0.00% -100.00% |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.854mb -0.01%  | 12.363ms +0.09%  | ±0.31% -89.36%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 114.201mb -0.01% | 57.522ms +0.02%  | ±1.49% +33.07%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 80.345mb -0.01%  | 1.533ms +0.33%   | ±3.48% +431.95% |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 83.634mb -0.01%  | 61.242ms -1.04%  | ±0.61% -57.55%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 81.398mb -0.01%  | 3.929ms +1.96%   | ±1.54% +56.72%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 78.796mb -0.01%  | 40.508ms -3.85%  | ±0.38% -73.10%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 78.797mb -0.01%  | 41.496ms -2.42%  | ±1.40% +17.82%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 78.796mb -0.01%  | 42.182ms -0.92%  | ±2.26% +99.39%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 80.957mb -0.01%  | 8.401ms +7.17%   | ±1.31% +295.43% |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 78.707mb -0.01%  | 31.577ms +6.59%  | ±3.65% +462.51% |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 78.517mb -0.01%  | 14.148μs +6.13%  | ±3.78% +115.77% |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 78.517mb -0.01%  | 16.724μs +8.68%  | ±3.19% +419.51% |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 97.535mb -0.01%  | 184.825ms -0.12% | ±0.70% +202.61% |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 49.242mb -0.01%  | 380.762ms -0.37% | ±0.05% -95.98%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 12.810mb -0.05%  | 77.222ms +0.58%  | ±1.13% +133.45% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 103.318mb -0.01% | 461.323ms -0.40% | ±0.73% +176.39% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 53.829mb -0.01%  | 233.347ms +0.09% | ±0.95% -45.44%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.407mb -0.04%  | 51.575ms +1.63%  | ±0.92% +12.22%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@codecov
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.55%. Comparing base (7245870) to head (88d843a).
Report is 7 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1336      +/-   ##
==========================================
+ Coverage   82.50%   82.55%   +0.04%     
==========================================
  Files         644      643       -1     
  Lines       17432    17428       -4     
==========================================
+ Hits        14383    14388       +5     
+ Misses       3049     3040       -9     
Components Coverage Δ
etl 85.84% <90.90%> (+0.13%) ⬆️
cli 85.17% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.60% <ø> (ø)
lib-doctrine-dbal-bulk 97.36% <ø> (ø)
lib-filesystem 76.24% <ø> (ø)
lib-parquet 84.16% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-rdsl 87.09% <ø> (ø)
lib-snappy 91.24% <ø> (-0.47%) ⬇️
bridge-filesystem-async-aws 90.60% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 77.10% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 90.14% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 78.04% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 92.85% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.80% <ø> (ø)
adapter-parquet 60.74% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (ø)

@norberttech norberttech merged commit cde543f into flow-php:1.x Jan 6, 2025
21 of 22 checks passed
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.

1 participant