|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56912 Object oriented ,built-in class
Submitted: 2006-03-24 01:37 UTC Modified: 2008-02-10 20:33 UTC
From: judas dot iscariote at gmail dot com Assigned:
Status: Closed Package: svn (PECL)
PHP Version: 5_1 CVS-2006-03-24 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: judas dot iscariote at gmail dot com
New email:
PHP Version: OS:


 [2006-03-24 01:37 UTC] judas dot iscariote at gmail dot com
Will be nice if you can add a class to the extension,for PHP5+  to avoid using the procedural style.

thanks for your time.

Reproduce code:

Expected result:
class implemented

Actual result:
class not implemented


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-03 18:22 UTC] edwardzyang at thewritingpot dot com
It would probably be better if you actually proposed an interface for your feature request. Personally, I think that the functions are sufficient, since most of us are used to working with SVN from the command-line.
 [2007-04-03 23:31 UTC] alan at akbkhome dot com
Patches always welcome, this should be quite trivial to add - have a look at the xmms extension for ideas.
 [2007-04-04 23:44 UTC] edwardzyang at thewritingpot dot com
While I can't really give a patch (can't write C, only read it , and not very well), I did some thinking, and I think the main selling point of an object-oriented SVN function would be that it would abstract away the working copy. Classically, SVN functions that operated on your working copy would automatically know what to do based on your current working directory, eg. svn commit would commit the directory it was in: you didn't have to specify that. With svn_commit(), you have to specify the directory, so an "SVN" object would be bound to that working directory so all you'd have to call was $svn->commit(); which might be more logically named $working_copy->commit().

Sorry if I lost anyone there. Still thinking about it.
 [2007-05-28 12:28 UTC] axel at kollmorgen dot net
actually, all other subversion language bindings [1] use an object oriented style. this greatly eases development, and i would very much welcome anything into that direction.

did anyone ever have a look at the feasibility of SWIG [2] php bindings for subversion [3]? this would gain us automatic interface generation, a complete implementation of the subversion apis, less hand-coding, reuse of subversions existing swig infrastructure, and possibly object orientation. unfortunately, my c is worse than my french, so i cannot help directly in implementing this. everyone giving this a try has my moral and testing support, though. thanks a lot!

 [2007-05-28 12:43 UTC]
swig is broken when it comes to generating PHP code
 [2007-05-28 14:00 UTC] axel at kollmorgen dot net
when did you last check? they seem to have fixed some bugs in the last months [1][2]. and i guess a simple swig php svn binding wouldn't need all of PHPs "advanced" features, thus reducing the "swig is broken when it comes to generating PHP code" further. or is it something fundamental?

 [2007-05-28 15:04 UTC]
Ah, nice.  Last I looked there was no PHP 5 support and plenty of comments in the source template along the lines of "FIXME, this is totally broken".
I haven't reviewed the actual code in those commits you referenced, but the fact that there is activity there inspires hope and perhaps confidence.
 [2008-02-10 16:43 UTC] edwardzyang at thewritingpot dot com
According to the changelog for 0.3, "an OO interface" was added. Does this mean this bug is fixed?
 [2008-02-18 02:50 UTC] axel at kollmorgen dot net
i don't know who closed this issue, but this is definitely wrong. what the 0.3 release does is adding a pseudo static class interface around *four* functions. so instead of svn_checkout(), you can now do Svn::checkout(). same for cat, log, and status - *not* for all the other functions.

this in no way changes the way you can work with this extension. Svn::checkout() still returns bool, Svn::log() still an array of untyped log entries. you don't have any objects (client, revision, working copy, transaction, etc.) to work with - which is what this issue is all about.

for examples of real object-oriented interfaces to subversion, see any of the "object oriented bindings" at , e.g. or .

please re-open.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 01:01:24 2021 UTC