Skip to content

Restore Interface Contract in DOM.php#41

Merged
jakejackson1 merged 1 commit intomainfrom
query-contract
Dec 11, 2022
Merged

Restore Interface Contract in DOM.php#41
jakejackson1 merged 1 commit intomainfrom
query-contract

Conversation

@jakejackson1
Copy link
Copy Markdown
Member

In 35e9266 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:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

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?

  • Yes
  • No

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 11, 2022

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%) ⬇️

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

In 35e9266 the $selector property was changed from null to '', which broke the Query interface contract.

Restore the contract to prevent a breaking change, and partially revert the $selector defaults back to null
@jakejackson1 jakejackson1 merged commit 061d39a into main Dec 11, 2022
@jakejackson1 jakejackson1 deleted the query-contract branch December 11, 2022 11:47
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant