Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2632

PHP: add "validate" option to generate read/write validation code

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.2
    • Component/s: PHP - Compiler
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              stigsb Stig Bakken
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: