We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.12.0
8.2
No response
interface EmployeeService { public function ListEmployee( array $ctx, \Org\Example\ListEmployee\Request $req ): \Org\Example\ListEmployee\Response; }
Messages are generated correctly by protoc, but service interface has broken imports if Request and Response messages are nested.
interface EmployeeService { public function ListEmployee( array $ctx, \Org\Example\Request $req ): \Org\Example\Response; }
syntax = "proto3"; package org.example; service EmployeeService { rpc ListEmployee(ListEmployee.Request) returns (ListEmployee.Response); } message ListEmployee { message Request { string organization_id = 1; } message Response { oneof response { Result result = 1; string access_denied = 2; } message Result { repeated Employee employees = 1; } message Employee { string id = 1; string name = 2; } } }
Generate code with:
./bin/proto/${ARCH}/protoc \ --plugin=protoc-gen-twirp_php=./bin/proto/${ARCH}/protoc-gen-twirp_php \ -I=./proto \ -I=./proto/include \ --twirp_php_out=./generated \ --php_out=./generated \ $(find ./proto -name "*.proto" -not -path "./proto/include/*")
The text was updated successfully, but these errors were encountered:
Thanks for reporting!
I rarely use nested messages TBH.
Are you interested in contributing a failing test case and a patch?
Sorry, something went wrong.
@sagikazarmark I just found a spec with nested request & response and it's working well in TypeScript Twirp generator, but not working for PHP.
Successfully merging a pull request may close this issue.
Preflight Checklist
Version
0.12.0
PHP version
8.2
Go version
No response
Expected Behavior
Actual Behavior
Messages are generated correctly by protoc, but service interface has broken imports if Request and Response messages are nested.
Steps To Reproduce
Generate code with:
Additional Information
No response
The text was updated successfully, but these errors were encountered: