[ 
https://issues.apache.org/jira/browse/THRIFT-2632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069431#comment-14069431
 ] 

Jens Geyer edited comment on THRIFT-2632 at 7/21/14 10:26 PM:
--------------------------------------------------------------

Hi,

-two- three remarks:
 * In the generated code, {{validateForWrite()}} gets called during 
{{write()}}. When will {{validateForRead()}} be called?
 * Is it possible to suppress empty methods and calls in case of all fields 
being optional?
 * Please document the new switch, see at the bottom of the file on how to do 
this.


was (Author: jensg):
Hi,

two remarks:
 * In the generated code, {{validateForWrite()}} gets called during 
{{write()}}. When will {{validateForRead()}} be called?
 * Please document the new switch, see at the bottom of the file on how to do 
this.

> PHP: add "validate" option to generate read/write validation code
> -----------------------------------------------------------------
>
>                 Key: THRIFT-2632
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2632
>             Project: Thrift
>          Issue Type: Improvement
>          Components: PHP - Compiler
>            Reporter: Stig Bakken
>            Priority: Minor
>
> Currently, generated PHP code will happily read and write messages with 
> missing required fields.  This patch adds a "validate" option for PHP to 
> generate validator methods and call them after reading and before writing 
> objects
> If a required field is missing, a TProtocolException is thrown both for read 
> and write.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to