Hey Jens, The IDL that would cause this problem looks like:
{noformat} service helloSvc { string getMessage(1: string name) } {noformat} So literally no namespace. What this causes PHP to generate is: {noformat} namespace ; {noformat} Which is illegal PHP. If you use a namespace in your IDL (namespace * or namespace php) all is well, thus ThriftTest.thrift hides the bug. Sorry my description was not clearer. Best, Randy On Thu, Feb 5, 2015 at 11:20 PM, Jens Geyer <jensge...@hotmail.com> wrote: > Wonder why this doesn't throw an IDL syntax error. Is that valid syntax? I > doubt that. > ________________________________ > Von: Randy Abernethy (JIRA) > Gesendet: 06.02.2015 01:57 > An: dev@thrift.apache.org > Betreff: [jira] [Created] (THRIFT-2981) IDL with no namespace produces > unparsable PHP > > Randy Abernethy created THRIFT-2981: > --------------------------------------- > > Summary: IDL with no namespace produces unparsable PHP > Key: THRIFT-2981 > URL: https://issues.apache.org/jira/browse/THRIFT-2981 > Project: Thrift > Issue Type: Bug > Components: PHP - Compiler > Affects Versions: 0.9.2 > Environment: all > Reporter: Randy Abernethy > Assignee: Randy Abernethy > Priority: Minor > Fix For: 0.9.3 > > > Compiling IDL for PHP without a namespace produces: > > {noformat} > namespace ; > {noformat} > > in the generated code which causes PHP to produce: > > {noformat} > PHP Parse error: syntax error, unexpected ';', expecting identifier > (T_STRING) or \\\\ (T_NS_SEPARATOR) or '{' in ... on line 2 > {noformat} > > patch forthcoming. > > > > -- > This message was sent by Atlassian JIRA > (v6.3.4#6332)