Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix regression in ArrayHelper::map #20328

Closed
wants to merge 1 commit into from

Conversation

chriscpty
Copy link
Contributor

fix regression in ArrayHelper::map when trying to use magic methods

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #20327

Also added a test to check for this regression in the future.

! fix regression in ArrayHelper::map when trying to use magic methods
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.84%. Comparing base (1c191ea) to head (cd03a41).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20328      +/-   ##
============================================
- Coverage     64.85%   64.84%   -0.01%     
+ Complexity    11435    11430       -5     
============================================
  Files           431      431              
  Lines         37193    37191       -2     
============================================
- Hits          24120    24118       -2     
  Misses        13073    13073              

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


public function __isset($name)
{
return isset($this->$name);
Copy link
Contributor

Choose a reason for hiding this comment

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

This implementation is incorrect - it returns false for magic and moreMagic properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing that out - the tests end up succeeding if isset is implemented correctly.

After testing with where I initially noticed the "issue" first, I figured out it's actually another implementation problem on my end 🤦 nevermind this PR and issue lol

@chriscpty chriscpty closed this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants