flow-php / flow

Flow PHP - data processing framework
https://flow-php.com
MIT License
404 stars 23 forks source link

Fix deprecated dynamic property usage #1086

Closed stloyd closed 4 weeks ago

stloyd commented 1 month ago

Change Log

Added

Fixed

  • Fix deprecated dynamic property usage

Changed

Removed

Deprecated

Security


Description

1) /Users/stloyd/Documents/flow/src/core/etl/src/Flow/ETL/Filesystem/Stream/FileStream.php:29
Creation of dynamic property Flow\ETL\Filesystem\Stream\VoidStreamWrapper::$context is deprecated

Triggered by:

* Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\NotPartitioned\IgnoreModeTest::test_open_stream_for_existing_file
  /Users/stloyd/Documents/flow/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/IgnoreModeTest.php:19

* Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\Partitioned\IgnoreModeTest::test_open_stream_for_existing_partition_with_existing_file
  /Users/stloyd/Documents/flow/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php:20
github-actions[bot] commented 1 month ago

Flow PHP - Benchmarks

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

Extractors ```shell +-----------------------+-------------------+------+-----+------------------+------------------+----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +-----------------------+-------------------+------+-----+------------------+------------------+----------------+ | AvroExtractorBench | bench_extract_10k | 1 | 3 | 35.449mb +0.00% | 828.748ms +0.18% | ±0.56% +28.67% | | CSVExtractorBench | bench_extract_10k | 1 | 3 | 5.167mb +0.00% | 336.413ms +0.04% | ±0.17% -70.50% | | JsonExtractorBench | bench_extract_10k | 1 | 3 | 5.200mb +0.00% | 1.067s -0.98% | ±0.51% -3.37% | | ParquetExtractorBench | bench_extract_10k | 1 | 3 | 135.872mb +0.00% | 907.962ms -0.09% | ±1.05% +26.91% | | TextExtractorBench | bench_extract_10k | 1 | 3 | 4.958mb +0.00% | 35.432ms -2.35% | ±0.33% -66.64% | | XmlExtractorBench | bench_extract_10k | 1 | 3 | 4.963mb +0.00% | 435.936ms -3.31% | ±0.23% -86.05% | +-----------------------+-------------------+------+-----+------------------+------------------+----------------+ ```
Transformers ```shell +-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+ | RenameEntryTransformerBench | bench_transform_10k_rows | 1 | 3 | 116.265mb +0.00% | 59.603ms -0.99% | ±0.51% -61.37% | +-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+ ```
Loaders ```shell +--------------------+----------------+------+-----+------------------+------------------+-----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +--------------------+----------------+------+-----+------------------+------------------+-----------------+ | AvroLoaderBench | bench_load_10k | 1 | 3 | 96.834mb +0.00% | 456.017ms +2.19% | ±0.87% +10.02% | | CSVLoaderBench | bench_load_10k | 1 | 3 | 55.246mb +0.00% | 69.279ms +1.51% | ±0.84% +156.23% | | JsonLoaderBench | bench_load_10k | 1 | 3 | 107.620mb +0.00% | 52.538ms +2.36% | ±0.19% -55.64% | | ParquetLoaderBench | bench_load_10k | 1 | 3 | 227.039mb +0.00% | 1.447s +2.64% | ±1.97% +97.15% | | TextLoaderBench | bench_load_10k | 1 | 3 | 18.001mb +0.00% | 39.370ms +0.88% | ±0.25% -78.32% | +--------------------+----------------+------+-----+------------------+------------------+-----------------+ ```
Building Blocks ```shell +-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+ | RowsBench | bench_chunk_10_on_10k | 2 | 3 | 87.083mb +0.00% | 3.739ms +10.86% | ±0.29% -84.92% | | RowsBench | bench_diff_left_1k_on_10k | 2 | 3 | 102.681mb +0.00% | 190.471ms +0.29% | ±0.64% -11.97% | | RowsBench | bench_diff_right_1k_on_10k | 2 | 3 | 85.401mb +0.00% | 19.136ms -1.24% | ±0.56% -16.89% | | RowsBench | bench_drop_1k_on_10k | 2 | 3 | 88.323mb +0.00% | 1.969ms +13.33% | ±1.26% -4.37% | | RowsBench | bench_drop_right_1k_on_10k | 2 | 3 | 88.323mb +0.00% | 1.919ms +11.60% | ±1.09% +86.47% | | RowsBench | bench_entries_on_10k | 2 | 3 | 85.435mb +0.00% | 3.028ms +6.62% | ±0.49% -85.14% | | RowsBench | bench_filter_on_10k | 2 | 3 | 85.964mb +0.00% | 18.280ms +13.10% | ±3.43% +590.50% | | RowsBench | bench_find_on_10k | 2 | 3 | 85.964mb +0.00% | 18.217ms +11.51% | ±0.77% -77.91% | | RowsBench | bench_find_one_on_10k | 10 | 3 | 83.868mb +0.00% | 2.000μs +18.07% | ±0.00% -100.00% | | RowsBench | bench_first_on_10k | 10 | 3 | 83.868mb +0.00% | 0.400μs 0.00% | ±0.00% 0.00% | | RowsBench | bench_flat_map_on_1k | 2 | 3 | 93.218mb +0.00% | 12.620ms +2.83% | ±1.62% +355.66% | | RowsBench | bench_map_on_10k | 2 | 3 | 122.589mb +0.00% | 62.079ms +0.84% | ±1.28% +22.62% | | RowsBench | bench_merge_1k_on_10k | 2 | 3 | 86.484mb +0.00% | 1.547ms +8.27% | ±0.90% -73.33% | | RowsBench | bench_partition_by_on_10k | 2 | 3 | 89.831mb +0.00% | 64.740ms +2.69% | ±0.55% -37.51% | | RowsBench | bench_remove_on_10k | 2 | 3 | 88.585mb +0.00% | 4.439ms +4.93% | ±1.99% +14.24% | | RowsBench | bench_sort_asc_on_1k | 2 | 3 | 84.012mb +0.00% | 39.803ms +0.78% | ±0.63% -7.61% | | RowsBench | bench_sort_by_on_1k | 2 | 3 | 84.012mb +0.00% | 39.600ms +1.39% | ±1.58% +141.46% | | RowsBench | bench_sort_desc_on_1k | 2 | 3 | 84.012mb +0.00% | 39.624ms -4.64% | ±1.03% -11.86% | | RowsBench | bench_sort_entries_on_1k | 2 | 3 | 86.309mb +0.00% | 7.561ms +3.52% | ±0.84% +244.31% | | RowsBench | bench_sort_on_1k | 2 | 3 | 83.868mb +0.00% | 28.962ms +1.77% | ±1.79% +288.55% | | RowsBench | bench_take_1k_on_10k | 10 | 3 | 83.868mb +0.00% | 14.120μs +2.98% | ±1.21% -37.40% | | RowsBench | bench_take_right_1k_on_10k | 10 | 3 | 83.868mb +0.00% | 16.359μs +0.23% | ±1.51% +97.57% | | RowsBench | bench_unique_on_1k | 2 | 3 | 102.682mb +0.00% | 191.851ms -0.47% | ±0.16% -76.86% | | NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 116.813mb +0.00% | 494.428ms -1.73% | ±1.97% +114.83% | | NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 60.291mb +0.00% | 247.698ms -1.86% | ±0.95% -72.32% | | NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 15.225mb +0.00% | 54.617ms +1.92% | ±2.18% +341.40% | | TypeDetectorBench | bench_type_detector | 1 | 3 | 59.996mb +0.00% | 435.458ms +0.40% | ±0.60% +183.66% | | TypeDetectorBench | bench_type_detector | 1 | 3 | 14.535mb +0.00% | 87.116ms +0.48% | ±0.14% -88.65% | +-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+ ```
norberttech commented 1 month ago

I believe it was done this way for a reason but cant remember it right now, could you launch one of the remote filesystem examples before I merge to confirm that everything works fine?

norberttech commented 4 weeks ago

just confirmed that everything works fine 👍