allegro / php-protobuf

PHP Protobuf - Google's Protocol Buffers for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Groups are not supported error is being thrown without any groups in .proto file

opened this issue · comments

Here is my .proto file, as you can see there are no groups in my .proto file

syntax = "proto3";

message Asset {
    uint64 id = 1;
    string name = 2;
    bool symbol = 3;
    string symbolLeverate = 4;
    uint64 tailDigits = 5;
    string lastUpdated = 6;
    float stdev = 7;
    string type = 8;
    uint64 showInHome = 9;
    float tradePrice = 10;
    uint64 priceTick = 11;
    uint32 color = 12;
    string trend = 13;
    uint64 trendType = 14;
    string feedSystem = 15;
    string expirySystem = 16;
    bool dotSuspended = 17;
    bool ldoSuspended = 18;
    bool weekendTradingEnable = 19;
    bool forexSuspended = 20;
    uint32 pipTailDigits = 21;
    bool regularSuspended = 22;
    bool builderSuspended = 23;
    bool sixtySuspended = 24;
    bool oneTouchSuspended = 25;
    bool hiddenBeforeLogin = 26;
    bool isTradeable = 27;
}

On generating php class with protoc-gen-php.php I receive the following warns on all of my fields:

WARN: Ignoring 'id' field, groups are not supported.
WARN: Ignoring 'name' field, groups are not supported.
WARN: Ignoring 'symbol' field, groups are not supported.
WARN: Ignoring 'symbolLeverate' field, groups are not supported.
WARN: Ignoring 'tailDigits' field, groups are not supported.
WARN: Ignoring 'lastUpdated' field, groups are not supported.
WARN: Ignoring 'stdev' field, groups are not supported.
WARN: Ignoring 'type' field, groups are not supported.
WARN: Ignoring 'showInHome' field, groups are not supported.
WARN: Ignoring 'tradePrice' field, groups are not supported.
WARN: Ignoring 'priceTick' field, groups are not supported.
WARN: Ignoring 'color' field, groups are not supported.
WARN: Ignoring 'trend' field, groups are not supported.
WARN: Ignoring 'trendType' field, groups are not supported.
WARN: Ignoring 'feedSystem' field, groups are not supported.
WARN: Ignoring 'expirySystem' field, groups are not supported.
WARN: Ignoring 'dotSuspended' field, groups are not supported.
WARN: Ignoring 'ldoSuspended' field, groups are not supported.
WARN: Ignoring 'weekendTradingEnable' field, groups are not supported.
WARN: Ignoring 'forexSuspended' field, groups are not supported.
WARN: Ignoring 'pipTailDigits' field, groups are not supported.
WARN: Ignoring 'regularSuspended' field, groups are not supported.
WARN: Ignoring 'builderSuspended' field, groups are not supported.
WARN: Ignoring 'sixtySuspended' field, groups are not supported.
WARN: Ignoring 'oneTouchSuspended' field, groups are not supported.
WARN: Ignoring 'hiddenBeforeLogin' field, groups are not supported.
WARN: Ignoring 'isTradeable' field, groups are not supported.
WARN: Ignoring 'method' field, groups are not supported.
WARN: Ignoring 'assets' field, groups are not supported.

After that I recieve Asset.php class without any fields.

The problem is in one of the last commits:
02fd222#diff-28f4690b80caf0bc9dbfea57cfc24d06

After removing this else if statement everything worked fine:

else if ($fieldDescriptorProto->getType()) {
    $name = $fieldDescriptorProto->getName();
    Logger::warn("Ignoring '${name}' field, groups are not supported.");
}

I met the same problem. What do this warning mean?Is this a bug?

That is just a wrong check on using groups in proto file, just remove this check as for now.

I have removed skipping group fields temporarily. It was incorrectly implemented.