-
Notifications
You must be signed in to change notification settings - Fork 78
fix(array): cast numeric string keys into zend_ulong
and allow negative keys
#456
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(array): cast numeric string keys into zend_ulong
and allow negative keys
#456
Conversation
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.
@kakserpom thank you so much!
Didn't have a detailed look yet, but remembered that we have an ArrayKey
enum. Might want to utilise it here.
@kakserpom Would you mind adding integration and unit tests? |
Pull Request Test Coverage Report for Build 16000972716Details
💛 - Coveralls |
@kakserpom just a hint for commit messages you can use convco |
d725728
to
6e1789e
Compare
@Xenira Ordnung über alles? 😁 |
@kakserpom keep it in english pls 😉 |
7bf3255
to
d528a4e
Compare
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.
Looks like this needs a rebase and to get rid of the clippy bits now that the clippy updated PR merged. Other than that though, LGTM. 🙂
@Qard done |
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.
What about all the #[allow(clippy::mut_from_ref)] lines? Are those actually necessary?
@Qard yes, otherwise Clippy shows warnings because of &self instead of &mut self in function signatures. |
Ah, so it's intentional to leave it then? Just wanted to be sure we weren't just forgetting to un-silence clippy in some places it might have legitimate warnings. 😅 |
Yes, It's intentional. I've enabled clippy::pedantic in another PR and quite a few warnings appeared, some of them led to actual fixes and some had to be silenced. |
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.
The clippy changes I guess aren't related to this PR, but necessary to get CI to pass, so that's fine.
Everything LGTM. Hopefully this can land soon to unblock other things. 🙂
@kakserpom @Qard Regarding the clippy issues: Our usual procedure is to create a mr fixing those issues and rebase affected MRs. I have created one for the current issues, except the ones in #461, as those require some more investigation and possible breaking changes. @kakserpom could you remove those ignores and rebase once #474 is merged? |
08be145
to
c511bd2
Compare
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.
Only some small changes needed.
Could you also add integration tests for negative and 'string number' indices?
4e58912
to
1cdea5d
Compare
1cdea5d
to
6989a08
Compare
I'd rather someone else do it because I am on a trip until the end of the week. It's pretty trivial. |
Sure, will add them :) |
Github wont let me amend this, so here is a commit that hopefully gets squashed. Refs: davidcole1340#453
zend_ulong
and allow negative keys
#453