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
Don't mutate $limit argument from 0 to -1 and from -1 to 0 in preg_split
function
#1347
Don't mutate $limit argument from 0 to -1 and from -1 to 0 in preg_split
function
#1347
Conversation
It is wrong to completely deny mutations. |
@vjik added more tests to show that it works. But found an issue with Decrement mutator when Because of: infection/src/Mutator/Number/DecrementInteger.php Lines 82 to 84 in 5682c2e
and similar with Increment mutator when: Because of: infection/src/Mutator/Number/IncrementInteger.php Lines 71 to 73 in f8cf148
|
See #1350 IncrementInteger work fine without fixes. Problems with DecrementInteger and OneZeroInteger. |
@vjik |
IncrementInteger don't work for |
preg_split
functionpreg_split
function
075476b
to
fe4adfd
Compare
preg_split
functionpreg_split
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@vjik I suppose all possible cases were covered. PR is ready for review.
It didn't work right as mutators had an issue with negative values. This behavior was fixed in #1351. So current master will mutate values from -1 to 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are sensible.
Thank you @sidz 👍 |
This PR stops mutate $limit argument from 0 to -1 and from -1 to 0 in
preg_split
function.Requested in #1345