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

Stig Bakken commented on THRIFT-2632:
-------------------------------------

Hi Jens,

Thanks for the feedback!

1. validateForRead() will be called in the read() method after decoding the 
object but before returning it (line 857)

2. Certainly, I'll push a patch for that, but it will require that validator 
methods are private, since they may or may not be present.

3. Fixed.

(Changes pushed to github)


> 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
>            Assignee: Jens Geyer
>            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