GravityPDF / querypath

A fork of QueryPath: a PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP8.3 support
Other
23 stars 3 forks source link

Restore Interface Contract in DOM.php #41

Closed jakejackson1 closed 1 year ago

jakejackson1 commented 1 year ago

In https://github.com/GravityPDF/querypath/commit/35e92660d680f18a332eec10fdc8a6ecc7596fb7 the $selector property was changed from null to '', which broke the Query interface contract.

Restore the contract, instead of updating the interface, to prevent a breaking change.

Pull Request type

Please check the type of change your PR introduces:

What is the current behavior?

The interface and the class implementing it were at odds with the type hints.

What is the new behavior?

Update the class so it matches the interface.

Does this introduce a breaking change?

codecov[bot] commented 1 year ago

Codecov Report

Merging #41 (86e4bc2) into main (d264d91) will decrease coverage by 0.00%. The diff coverage is 83.33%.

@@             Coverage Diff              @@
##               main      #41      +/-   ##
============================================
- Coverage     88.40%   88.39%   -0.01%     
  Complexity     1349     1349              
============================================
  Files            26       26              
  Lines          3088     3086       -2     
============================================
- Hits           2730     2728       -2     
  Misses          358      358              
Impacted Files Coverage Δ
src/qp_functions.php 66.66% <ø> (ø)
src/QueryPath.php 68.75% <75.00%> (ø)
src/DOM.php 89.74% <100.00%> (-0.11%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.