[ 
https://issues.apache.org/jira/browse/THRIFT-4432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashenp updated THRIFT-4432:
---------------------------
    Description: 
I defined a struct in thrift file with underlined name:

struct invite_record_change {
    1: required i32 record_id,
    2: optional i32 clear_state,
    3: optional i32 bonus,
    4: optional i32 settle_state,
    5: optional i32 paid_at,
    6: optional i32 final_clear_time,
    7: optional string remark,

}
and this name has been used by a funciton :
 bool invite_record_status_update(1: invite_record_change record_change)
 
but in generated php file, my struct name had been modified when I use it as a 
parameter:

public function invite_record_status_update(\talaris\wallet\InviteRecordChange 
$record_change)
  {
    $this->send_invite_record_status_update($record_change);
    return $this->recv_invite_record_status_update();
  }
Is it's a BUG? Or I missed something in Thrift Guide


  was:
I defined a struct in thrift file with underlined name:

struct invite_record_change {
    1: required i32 record_id,
    2: optional i32 clear_state,
    3: optional i32 bonus,
    4: optional i32 settle_state,
    5: optional i32 paid_at,
    6: optional i32 final_clear_time,
    7: optional string remark,

}
and this name has been used by a funciton :
 bool invite_record_status_update(1: invite_record_change record_change)
 
but in generated php file, my struct name had been modified when I use it as a 
parameter:

public function invite_record_status_update(\talaris\wallet\InviteRecordChange 
$record_change)
  {
    $this->send_invite_record_status_update($record_change);
    return $this->recv_invite_record_status_update();
  }



> thrift compiler changed my struct'name
> --------------------------------------
>
>                 Key: THRIFT-4432
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4432
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Ashenp
>
> I defined a struct in thrift file with underlined name:
> struct invite_record_change {
>     1: required i32 record_id,
>     2: optional i32 clear_state,
>     3: optional i32 bonus,
>     4: optional i32 settle_state,
>     5: optional i32 paid_at,
>     6: optional i32 final_clear_time,
>     7: optional string remark,
> }
> and this name has been used by a funciton :
>  bool invite_record_status_update(1: invite_record_change record_change)
>  
> but in generated php file, my struct name had been modified when I use it as 
> a parameter:
> public function 
> invite_record_status_update(\talaris\wallet\InviteRecordChange $record_change)
>   {
>     $this->send_invite_record_status_update($record_change);
>     return $this->recv_invite_record_status_update();
>   }
> Is it's a BUG? Or I missed something in Thrift Guide



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to