Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Nov 8, 2025

Resolves: #1967

Note this requires #1960 to be merged first.

Change Log


Added

  • Add a new `HTMLElementEntry` & related stuff

Fixed

Changed

Removed

Deprecated

Security

@codecov
Copy link

codecov bot commented Nov 8, 2025

Codecov Report

❌ Patch coverage is 41.60000% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.94%. Comparing base (19a6236) to head (d31d8db).
⚠️ Report is 8 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1972      +/-   ##
==========================================
- Coverage   79.09%   78.94%   -0.16%     
==========================================
  Files         839      841       +2     
  Lines       24952    25056     +104     
==========================================
+ Hits        19736    19780      +44     
- Misses       5216     5276      +60     
Components Coverage Δ
etl 87.71% <40.44%> (-0.54%) ⬇️
cli 85.96% <ø> (ø)
lib-array-dot 95.00% <ø> (ø)
lib-azure-sdk 60.39% <ø> (ø)
lib-doctrine-dbal-bulk 95.14% <ø> (ø)
lib-filesystem 80.68% <ø> (ø)
lib-types 87.74% <42.85%> (-0.49%) ⬇️
lib-parquet 68.35% <ø> (ø)
lib-parquet-viewer 83.04% <ø> (ø)
lib-snappy 90.18% <ø> (ø)
bridge-filesystem-async-aws 91.00% <ø> (ø)
bridge-filesystem-azure 89.47% <ø> (ø)
bridge-monolog-http 96.91% <ø> (ø)
bridge-openapi-specification 94.55% <100.00%> (+0.05%) ⬆️
symfony-http-foundation 73.17% <ø> (ø)
adapter-chartjs 86.36% <ø> (ø)
adapter-csv 89.08% <ø> (ø)
adapter-doctrine 90.97% <ø> (ø)
adapter-elasticsearch 97.17% <ø> (ø)
adapter-google-sheet 91.40% <ø> (ø)
adapter-http 60.56% <ø> (ø)
adapter-json 89.80% <ø> (ø)
adapter-logger 83.33% <ø> (ø)
adapter-meilisearch 97.87% <ø> (ø)
adapter-parquet 78.30% <0.00%> (-0.61%) ⬇️
adapter-text 88.09% <ø> (ø)
adapter-xml 83.07% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stloyd stloyd force-pushed the task/1967-html-element branch 3 times, most recently from 4207405 to 2ac6bf8 Compare November 9, 2025 12:24
@stloyd stloyd force-pushed the task/1967-html-element branch from 2ac6bf8 to 78718d4 Compare November 9, 2025 12:27
@stloyd stloyd removed the size: L label Nov 9, 2025
@stloyd stloyd force-pushed the task/1967-html-element branch from 78718d4 to fa246f4 Compare November 9, 2025 13:15
@stloyd stloyd force-pushed the task/1967-html-element branch 2 times, most recently from 4473f1c to 7913fa5 Compare November 9, 2025 13:21
@stloyd stloyd removed the size: XL label Nov 9, 2025
@norberttech
Copy link
Member

Before this can be merged please make the assertions in src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HTMLQuerySelectorAllTest.php and src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HTMLQuerySelectorTest.php to do something like other integration tests so it's obvious from looking at test what to expect after using those two functions

        self::assertSame(
            [
                [...]
            ],
            $df->fetch()
        );

@stloyd stloyd force-pushed the task/1967-html-element branch from b70a697 to 1c172c1 Compare November 9, 2025 13:44
@norberttech
Copy link
Member

norberttech commented Nov 9, 2025

One last missing thing is scalar function that would let to extract values from Element, similar to those:

  • src/core/etl/src/Flow/ETL/Function/DOMElementAttributesCount.php
  • src/core/etl/src/Flow/ETL/Function/DOMElementAttributeValue.php
  • src/core/etl/src/Flow/ETL/Function/DOMElementValue.php

Without them there is no way to interact with Element unless we cast it to string which is also not perfect.

}

#[DataProvider('cast_data_provider')]
public function test_cast(mixed $value, mixed $expected, ?string $exceptionClass = null) : void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be good to add few examples of castin HTMLElement and HTMLDocument to string in StringTypeTest

@stloyd stloyd force-pushed the task/1967-html-element branch from 1c172c1 to 4a4b74c Compare November 9, 2025 16:28
@stloyd stloyd force-pushed the task/1967-html-element branch from 1934786 to d31d8db Compare November 9, 2025 16:50
@norberttech norberttech merged commit 748a5ab into flow-php:1.x Nov 9, 2025
16 of 18 checks passed
@norberttech
Copy link
Member

Nice!! 🚀

@stloyd stloyd deleted the task/1967-html-element branch November 9, 2025 17:20
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.

[Task]: Create HTMLElement

2 participants