Skip to content

Conversation

@Baptouuuu
Copy link
Member

Problem

Closes #56

Unlike mentioned in the issue this is not problematic for formal/orm as it compares the objects identity before calling the equals method.

But this problem could still exist elsewhere.

Solution

Add a check at the start of the method to make an early return if the other Set is itself.

Note

The same problem applied to Sequence::equals() and has been fixed the same way.

@Baptouuuu Baptouuuu self-assigned this May 7, 2025
@Baptouuuu Baptouuuu added the bug Something isn't working label May 7, 2025
@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.07%. Comparing base (2db4729) to head (5b0f197).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
proofs/sequence.php 84.61% 2 Missing ⚠️
proofs/set.php 84.61% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop      #57      +/-   ##
=============================================
- Coverage      97.24%   97.07%   -0.18%     
- Complexity      1062     1064       +2     
=============================================
  Files             75       75              
  Lines           5268     5298      +30     
=============================================
+ Hits            5123     5143      +20     
- Misses           145      155      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Baptouuuu Baptouuuu merged commit c2e9387 into develop May 7, 2025
31 of 33 checks passed
@Baptouuuu Baptouuuu deleted the fix-set-equals branch May 7, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Set::equals() that shouldn't load its data when compared to itself

2 participants