Skip to content
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

New serialization approach for the RequestBuilder #226

Conversation

dwsupplee
Copy link
Contributor

Addresses: googleapis/google-cloud-php#1583

This approach relies on Google\Protobuf\Internal\Message::serializeToJsonString() as opposed to accessing private/protected variables on protobuf messages. Thanks to some great work over the last few weeks by @TeBoring and the rest of the protobuf team, we will be able to safely rely on this simpler approach with the next release of the protobuf extension.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 24, 2019
@codecov
Copy link

codecov bot commented Jan 24, 2019

Codecov Report

Merging #226 into master will increase coverage by 4.32%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
+ Coverage   86.99%   91.31%   +4.32%     
==========================================
  Files          68       49      -19     
  Lines        2552     2095     -457     
==========================================
- Hits         2220     1913     -307     
+ Misses        332      182     -150
Impacted Files Coverage Δ
.../Unit/testdata/test_service_rest_client_config.php 100% <ø> (ø) ⬆️
src/RequestBuilder.php 100% <100%> (+6.34%) ⬆️
src/Testing/MessageAwareArrayComparator.php
src/Testing/MockResponse.php
src/Testing/ProtobufMessageComparator.php
src/Testing/MessageAwareExporter.php
src/Testing/ReceivedRequest.php
src/Testing/MockUnaryCall.php
src/Testing/ProtobufGPBEmptyComparator.php
metadata/Google/ApiCore/Tests/Unit/Example.php
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba141d4...901a445. Read the comment docs.

@dwsupplee dwsupplee added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 24, 2019
Copy link
Contributor

@michaelbausor michaelbausor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -121,8 +121,7 @@
],
'MethodWithSpecialJsonMapping' => [
'method' => 'get',
'uriTemplate' => '/v1/special/mapping',
'placeholders' => []
'uriTemplate' => '/v1/special/mapping'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this change fits with the rest of the changes - do we need to remove placeholders? Or is it just cleanup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was just cleanup, I can undo if you like. Let me know!

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Feb 7, 2019
@michaelbausor
Copy link
Contributor

@dwsupplee protobuf 3.7.0 is out! https://github.com/protocolbuffers/protobuf/releases/tag/v3.7.0

Can we more this PR forward?

@dwsupplee
Copy link
Contributor Author

dwsupplee commented Feb 28, 2019

Absolutely 😄

@dwsupplee dwsupplee removed 🚨 This issue needs some love. do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Feb 28, 2019
Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@dwsupplee dwsupplee merged commit 816a2c1 into googleapis:master Feb 28, 2019
michaelbausor added a commit that referenced this pull request Mar 27, 2019
## Google ApiCore 1.0.0

Moving ApiCore to GA!

### RequestBuilding serialization approach
- Added a new serialization approach in RequestBuilder (#226)

### Protobuf changes
- Updated protobuf dependency to 3.7.1 (#232)
- Added conflict section to composer.json to prevent protobuf extension conflict (#232)
- Remove skip tests for protobuf extension (#230)

### Cleanup and dependencies
- Update common-protos dependency to 1.0 (#231)
- Update license files (#228)
michaelbausor added a commit that referenced this pull request Mar 27, 2019
## Google ApiCore 1.0.0

Moving ApiCore to GA!

### RequestBuilding serialization approach
- Added a new serialization approach in RequestBuilder (#226)

### Protobuf changes
- Updated protobuf dependency to 3.7.1 (#232)
- Added conflict section to composer.json to prevent protobuf extension conflict (#232)
- Remove skip tests for protobuf extension (#230)

### Cleanup and dependencies
- Update common-protos dependency to 1.0 (#231)
- Update license files (#228)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants