ZF-8603: Zend_Json_Server does not allow namespaces that start with numbers
-- Steven Brown firstname.lastname@example.org wrote (on Monday, 21 December 2009, 02:42 PM +1000):
I'm implemented a JSON-RPC server, but I've been snagged.
The namespace I want to use starts with a number.
This namespace does not pass the regular expressions that validate the namespaces in Zend_Json_Server_Smd_Service and Zend_Json_Server_Request, as a result the JSON-RPC server does not work.
If I remove the regular expression checks the code all works fine.
Given that namespaces starting with numbers are allowed in JSON-RPC, why are they being blocked in Zend_Json_Server?
Please don't suggest that I use a different namespace, due to forces outside of my control this would be a major headache.
Actually, there's really no reason to do so. My original thought on the matter was that it was a PHP limitation -- that we were mapping namespaces directly to PHP classes as a 1:1 mapping. However, that's not the case -- the namespace maps to a class, but they do not have to match.
Please file an issue in the tracker for this. In the meantime, simply extend Zend_Json_Server locally, and override the method that does the namespace check.
-- Matthew Weier O'Phinney Project Lead | email@example.com Zend Framework | http://framework.zend.com/