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

PHP old namespaces not generated for enums

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7, 0.8
    • Fix Version/s: 0.9
    • Component/s: PHP - Compiler
    • Labels:
      None

      Description

      (This is a continuation of THRIFT-1330 which I am unable to reopen.)
      In the PHP, old-style namespaces are still broken for enums:

      $ cat test.thrift 
      namespace php TestNamespace
      enum MyEnum {}
      $ thrift -version
      Thrift version 0.8.0
      $ thrift --gen php test.thrift
      $ grep "class TestNamespace" gen-php/test/test_types.php || echo "NO NAMESPACE FOUND"
      NO NAMESPACE FOUND
      $ thrift6 -version
      Thrift version 0.6.0
      $ thrift6 --gen php test.thrift
      $ grep "class TestNamespace" gen-php/test/test_types.php || echo "NO NAMESPACE FOUND"
      final class TestNamespace_MyEnum {
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sirbrialliance Jon Stephens
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: