Issues

ZF-9517: Zend_Json_Server should allow named parameters in any order

Description

When using named parameters in the 2.0 JSON-RPC spec, Zend_Json_Server should allow parameters to be passed in any order. Currently, names of parameters are ignored and the parameters are passed to the service method in the order they are supplied by the client.

I've created a patch which uses reflection to reorder the passed parameters when an associative array is detected. This is done before they are passed down to Zend_Server_Abstract since all specifications utilizing that class aren't equal. It may be worth discussing if it should be moved down, though.

http://www.pastie.org/882956

Comments

I am now using this patched version in production without issue. I've also added to the tests, covering the changes.

See the provided patch. I'd love to get this into the next release, so I can drop my local patches.

Patch with fix and unit test.

Tested, formatted, applied ajbrown's patch. (This is my first actual commit.. bear with me) :)

Thanks A.J.!