-
Notifications
You must be signed in to change notification settings - Fork 53
Improved performance of QueryDefaultsPlugin #94
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
Conversation
vudaltsov
commented
Jan 4, 2018
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Related tickets | #67 |
Documentation | |
License | MIT |
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.
indeed, that looks like it should be faster.
just to be sure: could this have any kind of side effect? i guess parameter order is preserved (it should not matter, but who knows)? and the behaviour when a parameter name is repeated would also stay the same?
@dbu , yes.
The order will be preserved. The new array will contain elements from |
Could this be merged? Or can I help somehow? Maybe add more tests? |
Im not sure about this. A side effect (that I think I see): $defaults = ['foo'=>'bar'];
$query = ['foo' => 'newValue'];
// Running the plugin
$output = 'foo=bar&foo=newValue'; Right? |
No, the output will be My solution should have no side effects. |
okey. Maybe I misread the code. Is there a test that cover this case? |
Sure! I hope I have time this weekend to commit such a test. |
…d by the default plugin value.
done |
@Nyholm , let's merge it? |
Thanks for this @vudaltsov and sorry for the wait, yes let's merge this |