You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jake Farrell (Closed) (JIRA)" <ji...@apache.org> on 2011/11/26 19:33:40 UTC
[jira] [Closed] (THRIFT-1392) Enabling both namespaces and
autoloading in generated PHP code won't work.
[ https://issues.apache.org/jira/browse/THRIFT-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell closed THRIFT-1392.
--------------------------------
Resolution: Fixed
Assignee: Mike Riley
Patch provided in Thrift-1330
> Enabling both namespaces and autoloading in generated PHP code won't work.
> --------------------------------------------------------------------------
>
> Key: THRIFT-1392
> URL: https://issues.apache.org/jira/browse/THRIFT-1392
> Project: Thrift
> Issue Type: Bug
> Components: PHP - Compiler
> Affects Versions: 0.7
> Environment: PHP 5.3.2
> Reporter: Mike Riley
> Assignee: Mike Riley
> Fix For: 0.8
>
> Attachments: THRIFT-1392.patch
>
>
> Using --gen php:autoload=1,namespace=1 won't work because the generated types don't have namespaces declared and the autoloader pulls in the individual files.
> I've attached a simple patch from the latest SVN trunk that will do two things inside t_php_generator::generate_php_struct_definition:
> * Append namespaces to the top of the file
> * Use the non-backslash-prefixed namespace declaration for the autoloader key
> I'm a little confused as to why there were even namespaces being written into the autoloader array at all when they were prefixed with a backslash, and __autoload receives class names without a leading backslash.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira