PHPackages                             wp-php-toolkit/svn - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wp-php-toolkit/svn

ActiveLibrary

wp-php-toolkit/svn
==================

Subversion client component for WordPress.

v0.9.0(1mo ago)00GPL-2.0-or-laterPHPPHP &gt;=7.2

Since Jun 12Pushed todayCompare

[ Source](https://github.com/wp-php-toolkit/svn)[ Packagist](https://packagist.org/packages/wp-php-toolkit/svn)[ Docs](https://wordpress.github.io/php-toolkit/reference/svn.html)[ RSS](/packages/wp-php-toolkit-svn/feed)WikiDiscussions trunk Synced today

READMEChangelogDependencies (5)Versions (40)Used By (0)

   slug svn   title Svn   install wp-php-toolkit/svn   see\_also    git | Git | Work with Git repositories through the same pure-PHP philosophy.

 filesystem | Filesystem | Place working copies on disk, in memory, or in other backends.

 http-client | HttpClient | The transport behind http:// and https:// repository access.

 xml | XML | The streaming parser behind the DAV protocol support.

    A Subversion client in pure PHP. Check out, update, and commit to SVN repositories – including WordPress.org's – over both `svn://` and `http(s)://`, without the `svn` binary or any PHP extension.

Why this exists
---------------

[](#why-this-exists)

WordPress itself lives in Subversion: core development happens in `develop.svn.wordpress.org` and every plugin and theme ships through `plugins.svn.wordpress.org` and `themes.svn.wordpress.org`. Automating anything around that ecosystem – deploying a plugin release, mirroring core, building developer tooling – traditionally requires shelling out to the `svn` binary, which hosted environments rarely provide.

This component implements the client side of both Subversion protocols in PHP: the custom `svn://` wire protocol (ra\_svn) and the HTTP-based one (mod\_dav\_svn, HTTP protocol v2). Checkouts and updates stream the server's "editor drive" – the same tree-delta mechanism the official client uses – so a full `wordpress-develop` checkout arrives in a single HTTP response and runs in tens of megabytes of memory.

`svn:externals` definitions are honored: referenced repositories are checked out as nested working copies, updated alongside their parent, and skipped by status and commit – matching the official client's behavior.

One caveat: working copies use this component's own `.svn` metadata format (JSON plus a pristine store), not the SQLite database of the official client. The repositories themselves are fully interoperable – commits made here are indistinguishable from commits made with `svn` – but a working copy created by one client cannot be operated on by the other.

Check out a plugin from WordPress.org
-------------------------------------

[](#check-out-a-plugin-from-wordpressorg)

Point `checkout()` at any repository URL. The revision, the depth, and `svn:externals` handling are controlled per call.

```
