Download the PHP package srwiez/grpc-protoset without Composer
On this page you can find all versions of the php package srwiez/grpc-protoset. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download srwiez/grpc-protoset
More information about srwiez/grpc-protoset
Files in srwiez/grpc-protoset
Package grpc-protoset
Short Description Convert a protoset file to a directory of .proto files
License MIT
Informations about the package grpc-protoset
gRPC Protoset Converter
A simple PHP library to convert a protoset file to proto files.
If you're here, you likely attempted to use a gRPC API and need to generate a PHP client. However, you may be stuck because you have a protoset file instead of a proto file.
This library will assist you in converting the protoset file to proto files.
It works well with gRPC servers that have the reflection service enabled. To learn more, check out the use case example below.
🚀 Installation
📚 Usage
Either use the ProtosetConverter
class directly.
or use the script provided by the package.
or if you have installed the package globally, you can use the following command:
🎁 Use case example (Starlink)
How to generate a PHP client for the Starlink API.
You will need to install the following dependencies:
First, get the protoset file from your Starlink device.
Then, convert the protoset file to proto files.
Finally, generate the PHP client.
Bonus, edit your composer.json file to autoload the generated PHP client.
📋 TODO
Contributions are welcome!
- Write tests by using the starlink protoset file
🤝 Contributing
Clone the project and run composer update
to install the dependencies.
Before pushing your changes, run composer qa
.
This will run pint (code style), phpstan (static analysis), and pest (tests).
👥 Credits
gRPC Protoset Converter was created by Eser DENIZ.
The following projects inspired this library and served as a reference:
- https://github.com/ewilken/starlink-rs
- https://github.com/sparky8512/starlink-grpc-tools
- https://github.com/fullstorydev/grpcurl
📝 License
gRPC Protoset Converter is licensed under the MIT License. See LICENSE for more information.