This repository was archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"require": { | ||
"silex/silex": "^1.3", | ||
"php": "^5.6" | ||
"php": "^5.6", | ||
"silex/silex": "^1.3" | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ extension=xmlrpc.so | |
extension=xsl.so | ||
extension=mongodb.so | ||
extension=redis.so | ||
extension=grpc.so |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/stanley-cheung/Protobuf-PHP" | ||
} | ||
], | ||
"require": { | ||
"silex/silex": "^1.3", | ||
"php": "^5.6" | ||
"php": "^5.6", | ||
"datto/protobuf-php": "dev-master", | ||
"google/auth": "dev-master", | ||
"grpc/grpc": "dev-release-0_13", | ||
"silex/silex": "^1.3" | ||
}, | ||
"autoload": { | ||
"classmap": ["web"] | ||
} | ||
} |
Oops, something went wrong.
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.
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.
Is @stanley-cheung interested in submitting his changes
datto/protobuf-php
? Why are we using his fork?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.
We tried, but the upstream repo has not responded in a year: drslump/Protobuf-PHP#48
But because he has submited his package to Packagist, we can't submit our fork unless we change the repo name.
That was why I have to resort to this
composer.json
syntax to use his official package on Packagist in therequire
section but substitute the actual content with our fork.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.
Shouldn't this get pulled in implicitly as part of the composer requirements for grpc?
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.
That is true. By pullinggrpc/grpc
, you are also implicitly pullingdatto/protobuf-php
(with a substituted fork) yes.Edit: sorry, I take that back. The
composer.json
file you should be looking at should be at the top level of thegrpc
repo: https://github.com/grpc/grpc/blob/master/composer.json. Packagist only look atcomposer.json
at the top level of a repo. There we did not pull indatto/protobuf-php
. I believe at that time we thought pulling indatto/protobuf-php
should be left to user of grpc.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.
Ok, so there's no need for specifying datto/protofuf-php here. I will remove it
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.
No problem, I added it back.
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.
OK gotcha. I advocate making it the default, since it will be very difficult for users to discover the need for them to override with your fork on their own.
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.
So I just tried this again yesterday. Even if the root level
grpc/composer.json
is going to pull indatto/protobuf-php
and with mystanley-cheung
override, as a user ofgrpc/grpc
, you are not going to get thestanley-cheung
override unless the user also puts that in their owncomposer.json
. In other words, as a user ofgrpc/grpc
, at the minimum, they still need torequire grpc/grpc
and add thestanley-cheung/protobuf-php
override. But then at least they don't need to includedatto/protobuf-php
. It's not ideal but I can spell it out more in grpc's documentation.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.
@stanley-cheung Yes, we should add this to composer. Also, are you sure the override is required in the userland
composer.json
? If so, that seems like a bug in composer. And also if so, we could submit your fork as a new composer package, which would definitely fix the issue.Requiring the users to override in
composer.json
rather than just callcomposer require grpc/grpc
is not acceptable DX IMHO. We could fork toGoogleCloudPlatform
and submit a new package from there.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.
Yes I have tried this again and an end-user needs to do this override, and I agree that it's non-ideal. OTOH, this was supposed to be a temporary bridgegap before we have official PHP support in google/protobuf - it's being implemented now. So if we can wait for a few months, this will all go away and we will have the official solution.