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

Xavier HAUSHERR commented on THRIFT-1615:
-----------------------------------------

No problem to use the namespace and oop option.

I have created the sf2 option to avoid breaking compatibility for the actual 
version.

My real problem is that the actual php lib doesn't allow me to be namespace 
compliant for Symfony 2.

Here is my guidelines (the one I follow in the phpsf2 library):
- Add a namespace for each class
- Have only one class per file
- Remove the hardcoded inclusion and replace with the "use command"
- Remove the autoloader

Nothing more was done. I have just copy and paste the original classes.
And my update on the compiler was only to follow that guidelines.

And there is no other changes.

So my question is: can I change the library to become really namespace 
compliant ? What is the limit. If I do that, I will lose the compatibility ith 
older PHP version.

Tell me how you see that patch and I'll follow your point of view.
                
> 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.8, 0.9
>
>         Attachments: 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