You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Mauro Maggi <ma...@immobiliare.it> on 2015/09/08 10:40:21 UTC

Thrift 0.9.2 - Generating code (and libraries) for PHP 5.2

Hi,

is it possible, as of thrift 0.9.2, to generate php code (and php libraries) compatible with PHP 5.2 ?
At the moment, i see that php code and libraries are generated for PHP 5.3+ (namespaces)

Thanks,
Mauro

Re: Thrift 0.9.2 - Generating code (and libraries) for PHP 5.2

Posted by Jake Farrell <jf...@apache.org>.
You can use a version before the namespace addition and still communicate
with newer versions with no problems, only difficult part is that you will
need to have both versions of the compiler available

-Jake

On Tue, Sep 8, 2015 at 6:32 AM, Mauro Maggi <ma...@immobiliare.it>
wrote:

> I’m already using Thrift in modern php code, but we have huge php 5.2
> codebases that cannot be migrated.
> Thank you for your directions to Nikic backporter, i’ll take a look.
>
> Thanks,
> Mauro
>
>
> > Il giorno 08/set/2015, alle ore 11:17, Stig Bakken <st...@zedge.net> ha
> scritto:
> >
> > No, it's not possible. If you are really, really not able to update your
> > code to a non-deprecated version of PHP, I suggest you try out some tool
> to
> > convert the Thrift-generated code to something without namespaces. This
> one
> > seems to do that (but I haven't tried it myself):
> >
> > https://github.com/nikic/PHP-Backporter
> >
> > - Stig
> >
> >
> > On Tue, Sep 8, 2015 at 10:40 AM, Mauro Maggi <mauro.maggi@immobiliare.it
> >
> > wrote:
> >
> >> Hi,
> >>
> >> is it possible, as of thrift 0.9.2, to generate php code (and php
> >> libraries) compatible with PHP 5.2 ?
> >> At the moment, i see that php code and libraries are generated for PHP
> >> 5.3+ (namespaces)
> >>
> >> Thanks,
> >> Mauro
> >
> >
> >
> >
> > --
> > Stig Bakken
> > CTO, Zedge.net - free your phone!
>
>

Re: Thrift 0.9.2 - Generating code (and libraries) for PHP 5.2

Posted by Mauro Maggi <ma...@immobiliare.it>.
I’m already using Thrift in modern php code, but we have huge php 5.2 codebases that cannot be migrated.
Thank you for your directions to Nikic backporter, i’ll take a look.

Thanks,
Mauro


> Il giorno 08/set/2015, alle ore 11:17, Stig Bakken <st...@zedge.net> ha scritto:
> 
> No, it's not possible. If you are really, really not able to update your
> code to a non-deprecated version of PHP, I suggest you try out some tool to
> convert the Thrift-generated code to something without namespaces. This one
> seems to do that (but I haven't tried it myself):
> 
> https://github.com/nikic/PHP-Backporter
> 
> - Stig
> 
> 
> On Tue, Sep 8, 2015 at 10:40 AM, Mauro Maggi <ma...@immobiliare.it>
> wrote:
> 
>> Hi,
>> 
>> is it possible, as of thrift 0.9.2, to generate php code (and php
>> libraries) compatible with PHP 5.2 ?
>> At the moment, i see that php code and libraries are generated for PHP
>> 5.3+ (namespaces)
>> 
>> Thanks,
>> Mauro
> 
> 
> 
> 
> -- 
> Stig Bakken
> CTO, Zedge.net - free your phone!


Re: Thrift 0.9.2 - Generating code (and libraries) for PHP 5.2

Posted by Stig Bakken <st...@zedge.net>.
No, it's not possible. If you are really, really not able to update your
code to a non-deprecated version of PHP, I suggest you try out some tool to
convert the Thrift-generated code to something without namespaces. This one
seems to do that (but I haven't tried it myself):

https://github.com/nikic/PHP-Backporter

 - Stig


On Tue, Sep 8, 2015 at 10:40 AM, Mauro Maggi <ma...@immobiliare.it>
wrote:

> Hi,
>
> is it possible, as of thrift 0.9.2, to generate php code (and php
> libraries) compatible with PHP 5.2 ?
> At the moment, i see that php code and libraries are generated for PHP
> 5.3+ (namespaces)
>
> Thanks,
> Mauro




-- 
Stig Bakken
CTO, Zedge.net - free your phone!