[ 
https://issues.apache.org/jira/browse/THRIFT-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400194#comment-13400194
 ] 

Mike Riley commented on THRIFT-1615:
------------------------------------

I was happy to see this patch because I'm working on a SF2 project myself and 
the bundle / patch here seems to have done the trick. So as far as my project 
is concerned this is great.  A few things though:

It looks like we've clobbered the old classes in the protocol extension, are we 
ok breaking backwards compatibility there? If we run under the assumption that 
people using namespaced code are namespacing everywhere, it should be ok to 
just include all of them (namespaced and non-namespaced) in the protocol build. 
It's messy because everything is defined twice, but I guess that's the nature 
of maintaining backwards compatibility.

We could entirely forego using the universal classloader / including those 
classes with thrift.  Instead it might be simpler to just re-implement the 
method used for loading classes in our own autoloader.  This won't prevent SF2 
projects from using the classes with the universal classloader and it prevents 
us from having to add more cruft to the PHP library.

If we're going to document the use of a bundle for SF2 here, would the thrift 
maintainers consider hosting one themselves rather than having an external 
maintainer? For the uninitiated: a symfony bundle needs to be maintained in a 
separate git repository if it's going to integrate properly with symfony's 
dependency management system.

I'll be using this patch this week and try to give some more feedback on it.
                
> Thrift for Symfony 2
> --------------------
>
>                 Key: THRIFT-1615
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1615
>             Project: Thrift
>          Issue Type: Improvement
>          Components: PHP - Compiler, PHP - Library
>    Affects Versions: 0.8, 0.9
>            Reporter: Xavier HAUSHERR
>              Labels: improvement, php, symfony2
>             Fix For: 0.9
>
>         Attachments: namespace.patch, thrift-0.8.x-phpsf2.patch, 
> thrift-trunk-phpsf2.patch
>
>
> Hi,
> In order to use Thrift with the Framework Symfony 2 and its great 
> ClassLoader, I have:
> namespaced your PHP Lib (phpsf2)
> added an option sf2 to the PHP compiler. The main differences, are the use of 
> namespace, and remove your autloader.
> I have done this in the 0.8x branch (stable version) and in your trunk.
> I use it with a Symfony bundle I create to have a cool integration in Symfony 
> 2. Here is the git: g...@github.com:ebuzzing/OverblogThriftBundle.git
> Feel free to send me any question, any feedback on my pull request.
> Best regards.
> Xavier HAUSHERR
> Overblog CTO
> @xkobal

--
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

        

Reply via email to