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

PHP old namespaces not generated for enums

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7, 0.8
    • 0.9
    • PHP - Compiler
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sirbrialliance Jon Stephens
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment