-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix JsonRpc service name #5196
Fix JsonRpc service name #5196
Conversation
@blanchonvincent was this the reason why Additionally, I think all valid identifiers should be discovered (see https://github.com/Ocramius/ProxyManager/blob/0.4.1/src/ProxyManager/Generator/Util/UniqueIdentifierGenerator.php#L30 ) That's the regex for a valid PHP class by the way: http://php.net/manual/en/language.oop5.basic.php |
@Ocramius hmm yes and no. Yes because there was a bug, but magic method cannot be seen by the Reflection API. |
@blanchonvincent seems to work with http://3v4l.org/lkCHd - is it an old bug? |
@Ocramius hmm I'm think I'm wrong about reflection and magic method |
@Ocramius updated! thank you |
@blanchonvincent travis failure |
fixed, thank you @samsonasik |
*/ | ||
protected $nameRegex = '/^[a-z][a-z0-9.\\\\_]+$/i'; | ||
protected $nameRegex = '/^(?!^rpc)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff\.\\\]*$/i'; |
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.
I guess that /i
is not longer necessary if you add A-Z
There is some definition explaining in detail the allowed characters of a method name? |
@blanchonvincent I was expecting some kind of explanation about why did you choose that ranges of characters (7f-ff, etc) Also reading that small paragraph about reserved method names
As far as I understand |
My point is document enough the regex pattern so we can understand the criteria in the future. |
@Maks3w right ! Look the last commit. Thank you. |
@blanchonvincent The PR looks ok for me. Just a last thing. Why backslash is allowed? |
@Maks3w I d'ont want to make a BC :/ |
Good catch @blanchonvincent |
@blanchonvincent Can you remove the trailing spaces which are making Travis-CI to fail?
|
@Maks3w done |
Json Rpc service name can begin with a "_"