-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
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
DocBlocks for services don't use absolute namespaces #65
Open
SimantovYousoufov
wants to merge
18
commits into
drslump:master
Choose a base branch
from
SimantovYousoufov:bug_use_absolute_ns_for_service_phpdoc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DocBlocks for services don't use absolute namespaces #65
SimantovYousoufov
wants to merge
18
commits into
drslump:master
from
SimantovYousoufov:bug_use_absolute_ns_for_service_phpdoc
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…_basestub codegen: have each generated client class extends Grpc\BaseStub class
…param Codegen: add options param
…all_calls Make sure call options are passed to all types of calls
…rated stub file name
Update package name and homepage
Rename conflicting function signature in PHP7
Update installation instruction
…ropriate param types for service methods.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preface
I have not added any tests for this PR because I was unsure how to actually run the test suite. If someone can provide some insight into how to run the suite, I'll add them in whatever tests are required ASAP.
Issue
These examples use code from the gRPC example.
Currently, the generated docblocks for services return:
These doc blocks are
$metadata
and$options
).Proposal
Add logic to
DrSlump\Protobuf\Compiler\PhpGenerator@compileStub
to handle the above cases based on the RPC type.It will now return:
I think the logic for how docblocks and actual method code are generated can be rewritten to generate them in parallel and merge them into
$s
after generation, but I'm hesitant to make these changes without knowing how to use the test suite and the maintainer(s) desires.