Undocumented PHP Options
The following two Pull Requests to the protocolbuffers/protobuf project add additional functionality for PHP Namespace when generating code with the Protocol Compiler.
- https://github.com/protocolbuffers/protobuf/pull/3162
- https://github.com/protocolbuffers/protobuf/pull/4609
This functionality is not documented in the PHP Generated Code Guide (https://protobuf.dev/reference/php/php-generated/)
Brent, can you take a look at this and let me know if there's anything I need to do to help?
On the Java page, there's documentation regarding the protobuf options java_package and java_outer_classname:
https://protobuf.dev/getting-started/javatutorial/
But PHP has no such documentation for php_namespace and php_metadata_namespace
Thanks for the help, Brent! I'll take a look at this, Nigel. Thanks for bringing it to my attention.
Thanks @Logofile,
Did you see the linked pull request?
I updated the "PHP Generated Code Guide" with the extra details. As somebody new to Protobuf a few weeks ago that section would have been the most useful for me.
I hadn't thought to compare it to other languages like Java Getting Started page (per comments above). PHP currently doesn't have a Getting Started page. I would be happy to raise a separate PR to introduce one, but I think both changes would still be valuable.
Thank you for providing the PRs. I wanted to check with Brent before merging them, because PHP is a special case with our process for maintaining consistency between our internal docs and external, in that PHP is available only in the external docs. I wanted to make sure that accepting the PRs wasn't going to cause things to get out of sync and lead to the new content getting overwritten in a later publish.
I'll work to get the PRs reviewed and incorporated (probably next week).
Thanks @Logofile, no rush on my end, I just wanted to check if there would be a preference for it to be in a PHP Getting Started section.
I lost track of this issue. The updates were made in this commit a couple of years ago.