[ 
https://issues.apache.org/jira/browse/THRIFT-3929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aki Sukegawa resolved THRIFT-3929.
----------------------------------
       Resolution: Fixed
         Assignee: Ben Meynell
    Fix Version/s:     (was: 1.0)
                   0.10.0

committed, thanks

> PHP "nsglobal" Option Results in Syntax Error in Generated Code (Trailing 
> Backslash)
> ------------------------------------------------------------------------------------
>
>                 Key: THRIFT-3929
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3929
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Compiler
>    Affects Versions: 0.9.3
>         Environment: Distributor ID: Ubuntu
> Description:    Ubuntu 14.04.4 LTS
> Release:        14.04
> Codename:       trusty
>            Reporter: Ben Meynell
>            Assignee: Ben Meynell
>              Labels: easyfix
>             Fix For: 0.10.0
>
>
> thrift --gen php:server,psr4,oop,validate,json,nsglobal="My\Special\Place" 
> -out ./src my.thrift
> Results in PHP files with namespaces defined as:
> namespace My\Special\Place\;
> Note the trailing backslash ("\"). This results in unparseable PHP:
> $ php -l src/My/Special/Place/Data.php
> Errors parsing src/My/Special/Place/Data.php
> The fix is to simply omit the trailing backslash from the generated code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to