Skip to content

feat(flow-php/etl): schema-driven constructor-less entry instantiation#2532

Merged
norberttech merged 1 commit into
1.xfrom
entry-instantiators
Jul 12, 2026
Merged

feat(flow-php/etl): schema-driven constructor-less entry instantiation#2532
norberttech merged 1 commit into
1.xfrom
entry-instantiators

Conversation

@norberttech

Copy link
Copy Markdown
Member

Change Log


Added

  • flow-php/etl - EntryInstantiator and Instantiators for constructor-less entry instantiation
  • flow-php/etl - EntryFactory::instantiate() creating entries from schema definitions without casting
  • flow-php/etl - Definition::entryClass() on all schema definitions, UnionDefinition resolves it from the left union member
  • flow-php/etl-adapter-parquet - ValueHydrator restoring Json/Uuid value objects from raw parquet strings

Fixed

Changed

  • flow-php/etl-adapter-parquet - ParquetExtractor builds entries through EntryFactory::instantiate() instead of array_to_row()
  • flow-php/etl - Floe HydratorColumn renamed to ColumnBlueprint, SchemaDecoder uses shared Instantiators
  • flow-php/types - Uuid constructor validates strings directly without Ramsey fallback
  • flow-php/flow-php-ext - schema decoding updated to relocated core entry instantiation classes

Removed

  • flow-php/etl - runtime value type detection from List/Map/Structure entry constructors
  • flow-php/types - isValid() short-circuit from ListType/StructureType::cast()

Deprecated

Security

This PR provides Parquet significant performance boost. Parquet is a self descriptive file format that comes with schema nad that validates this schema.

This means that Parquet data is already yielded as valid structures so we no longer need to use EntryFactory::createAs which additionally casts the value accordingly to the type (when reading CSV or DB everything is a string).
In case of Parquet or Floe (probably avro also in the future) it's not necessary.

For those scenarios I added EntryFactory::instantiate() which creates entry without casting/validation.

Additionally I removed Type::isValid from ListEntry, MapEntry, StructureEntry which bought even more perf boost.

@norberttech norberttech added this to the 0.42.0 milestone Jul 12, 2026
@norberttech norberttech added the hackaton-07-2026 A first Flow Hackaton with Stloyd and MrHDOLEK 🎉 label Jul 12, 2026
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.70115% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.37%. Comparing base (49d116b) to head (1136622).
⚠️ Report is 1 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2532      +/-   ##
============================================
+ Coverage     86.36%   86.37%   +0.01%     
- Complexity    22958    22975      +17     
============================================
  Files          1748     1749       +1     
  Lines         70535    70567      +32     
============================================
+ Hits          60918    60955      +37     
+ Misses         9617     9612       -5     
Components Coverage Δ
etl 89.86% <100.00%> (+0.02%) ⬆️
cli 89.40% <ø> (ø)
lib-array-dot 81.44% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 93.61% <ø> (ø)
lib-filesystem 86.04% <ø> (ø)
lib-types 90.54% <100.00%> (+0.36%) ⬆️
lib-parquet 70.23% <ø> (ø)
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.38% <ø> (-0.45%) ⬇️
lib-dremel 0.00% <ø> (ø)
lib-postgresql 88.62% <ø> (ø)
lib-telemetry 86.58% <ø> (ø)
bridge-filesystem-async-aws 92.74% <ø> (ø)
bridge-filesystem-azure 90.45% <ø> (ø)
bridge-monolog-http 96.82% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 92.07% <ø> (ø)
symfony-http-foundation 78.57% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.41% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 90.66% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.39% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.10% <ø> (ø)
adapter-chartjs 84.05% <ø> (ø)
adapter-csv 91.66% <ø> (ø)
adapter-doctrine 90.79% <ø> (ø)
adapter-google-sheet 99.18% <ø> (ø)
adapter-http 73.23% <ø> (ø)
adapter-json 88.71% <ø> (ø)
adapter-logger 50.00% <ø> (ø)
adapter-parquet 83.54% <90.00%> (+0.37%) ⬆️
adapter-text 74.13% <ø> (ø)
adapter-xml 86.58% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 94.21% <ø> (ø)
adapter-postgresql 91.06% <ø> (ø)
adapter-seal 93.87% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.32% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

  - move Floe entry instantiation into core as EntryInstantiator with
generic per-class Instantiators cache
- add EntryFactory::instantiate() creating entries without casting or
validation
- add Definition::entryClass() to all schema definitions;
UnionDefinition resolves it from the left union member, unwrapping
optional
- rename Floe HydratorColumn to ColumnBlueprint
- parquet: new ValueHydrator restores Json/Uuid value objects from raw
strings; extractor builds entries via instantiate() instead of
array_to_row()
- update flow_php extension to relocated core classes
@norberttech norberttech force-pushed the entry-instantiators branch from 36918a9 to 1136622 Compare July 12, 2026 11:55
@norberttech norberttech merged commit c0659fe into 1.x Jul 12, 2026
47 checks passed
@norberttech norberttech deleted the entry-instantiators branch July 12, 2026 12:11
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hackaton-07-2026 A first Flow Hackaton with Stloyd and MrHDOLEK 🎉 size: L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant