-
Notifications
You must be signed in to change notification settings - Fork 267
protoc plugin, repeated packed field support and many more #74
Conversation
@@ -0,0 +1,5 @@ | |||
{ | |||
"require": { | |||
"pear/console_commandline": "^1.2" |
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.
Are you sure it's a good idea to add a dependency? I understand that composer is a good tool to manage dependencies, but some teams don't use it, and thus you are forcing them to use this manager. Current version of this project doesn't require composer or any other external dependency (except protobuf). So changing this will bring some additional and unnecessary work for such teams.
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 had doubts about adding a dependency but then I thought - I don't see a point in reinventing the wheel. The libraries are out there for a reason - you don't have to redo what has already been done. The alternative is to create another command line parser which I don't like. I believe the composer is a way to work with dependencies and I don't see it to be a problem that someone doesn't use it in his project. It's fairly simple to use and because the protoc-gen-php
is external to your project it doesn't mean you need to use composer in it too now.
Sorry for the stupid comment, but I cannot fully understand - is this PR introduces associative array(map) support or no? I can only see a warning that it won't be fully supported but I cannot see what the limitations will be. Regards, |
@todorovhristo your question is good 😉 A map field is represented as an array of MapFieldEntry objects instead of simply array of keys and values. Take a look at the generated class. This kind of behavior is described in a greater detail in the official documentation in the Backwards compatibility. I see now this warning might be confusing and I wonder whether it's actually needed. Any suggestions on that subject are more than welcome. |
Ok I see now. It will be probably better to link the official documentation alongside with the github issue tracker. Or at least update the issue in github, as now looks a little bit as they are done in this revision. Apart from that great work on this, big thumbs up 👍 |
I like your suggestion. I changed the issue's description. I hope it's more clear now what the warning actually means. Thanks! |
@hjagodzinski You have changed compilation command from 'php protoc-php.php foo.proto' to 'php protoc-gen-php.php foo.proto'. I think it's better to keep backward compatibility and rename protoc-get-php.php to old style protoc-php.php. |
@serggp I wanted to rename the script to a name it should have from the beginning, accordant to Google's convention. Moreover the arguments the script accepts are different now (they mimic as close as possible the ones accepted by On the other hand I created this pull request instead of pushing directly to give a chance to others to check it out. I haven't received any complaints regarding the script name change. |
This pull request: