-
Notifications
You must be signed in to change notification settings - Fork 28
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
Error In PHP when using extensions #6
Comments
Options currently not supported, I'll be adding support for it. I'll ping you once i get it merged.. |
@luisgon1 This protobuf-php/protobuf-plugin@2000dd4 should fix the problem with option (only messages options are supported for now). <?php
/** @var $version \YourNamespace\BookVersion(); */
$version = \YourNamespace\BookAlive::descriptor()
->getOptions()
->extensions()
->get(\YourNamespace\Extension::version()); Please let me know if it works for you. |
It is not working, bellow is the $options set in the class built: $options = \google\protobuf\MessageOptions::fromArray([
It is not defining major or minor in another code I created it is not even defining the extensions |
|
After protobuf-php/protobuf-plugin@b9c91c2 it should generate the following : $options->extensions()->add(\Extension::version(), \BookVersion::__set_state(array(
'unknownFieldSet' => NULL,
'extensions' => NULL,
'major' => 9,
'minor' => 5,
'patch' => 9,
))); please make sure you have the latest version of :
|
I have updated everything from the latest versions |
Also it only works if you compile everything from 1 proto file. bookInfo.proto
books.proto
|
@luisgon1 The Please make sure you generate both files otherwise the plugin considers Something like : ./vendor/bin/protobuf \
-o ./path-to-php-src\
-i ./path-to-protos \
./path-to-protos/bookInfo.proto \
./path-to-protos/books.proto |
Closing it for now Please let me know if the problem continues. |
Its working perfect, thanks for the support
|
Thanks @luisgon1 |
Proto code bellow:
I am getting php error calling version method not found in class version on BookVersion class
The text was updated successfully, but these errors were encountered: