PHPackages                             emteknetnz/vendor-code-patcher - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. emteknetnz/vendor-code-patcher

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

emteknetnz/vendor-code-patcher
==============================

Vendor code patcher

0.2.9(3y ago)1603MITPHP

Since Dec 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/emteknetnz/vendor-code-patcher)[ Packagist](https://packagist.org/packages/emteknetnz/vendor-code-patcher)[ RSS](/packages/emteknetnz-vendor-code-patcher/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (14)Used By (0)

vendor-code-patcher
===================

[](#vendor-code-patcher)

Used to add private code patches directly to a private testing repo to bypass so make it easier to deploy to a testing environment.

Put your patches in BASE\_PATH . '/\_vendor\_patches' so they match the modules they're in, e.g.

\[project\_root\]/\_vendor\_patches/silverstripe/framework/0001-FIX-Multiple-files-changed.patch

Requirements
------------

[](#requirements)

The webserver you are deploying to requires the `patch` utility available. This will be available on the typical debian/ubuntu webserver.

Generating .patch files from GitHub pull-requests using wget (recommended method)
---------------------------------------------------------------------------------

[](#generating-patch-files-from-github-pull-requests-using-wget-recommended-method)

Simply suffix .diff to the pull-request url to get the target url, for instance

Note suffixing .patch only gets the last commit in a multi-commit pull-request

```
MYDIFF=https://github.com/silverstripe/silverstripe-admin/pull/1259.diff
MYDIR=_vendor_patches/silverstripe/admin
MYPATCH=0001-my.patch
mkdir -p $MYDIR
wget -O $MYDIR/$MYPATCH $MYDIFF

```

wget will resolve any redirects for you

**Important** - use wget to download the diff rather than copy pasting via your browser so that character encoding is retained. This is especially imporant for compressed bundle.js type of files when they contain a special space character e.g. nbsp. Copy pasting from your browser will usually mistakenly convert these characters to regular spaces, causing the patch to not be applied.

Generating .patch files from local files
----------------------------------------

[](#generating-patch-files-from-local-files)

Standard practice is to have a pull-request in a private repo for unreleased patches squashed down to a single commit.

Copy the sha from this single commit

```
cd vendor/silverstripe/framework
git remote add my-private-account git@github.com:my-private-account/silverstripe-framework.git
git fetch my-private-account
git format-patch -1 [sha]

```

Applying patches
----------------

[](#applying-patches)

Patches are automatically applied on the first ?flush=1 - this should happen as part of a deployment

Patch files are then moved to \[project\_root\]/\_vendor\_patches/\_patched so they won't be run on subsequent flushes

Note about javascript generated bundle files
--------------------------------------------

[](#note-about-javascript-generated-bundle-files)

You may have issues applying patches to generated bundle.js type of files due to minor differences when your local git checks them out

If you're experiencing issues, manually replacing your local copy of bundle.js with a copy pasted raw version from GitHub should resolve any issues.

Testing patches on local project
--------------------------------

[](#testing-patches-on-local-project)

To apply a patch to the local project to ensure the patch file is valid

`patch -p1 -l -r - -B /tmp/ -d vendor/silverstripe/framework < '_vendor_patches/silverstripe/framework/0001-my.patch'`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~66 days

Total

13

Last Release

1306d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a25bc04c5720a36869d5a39c6449dde7eb43e19b7c8e666d5f632d6a9ab440b1?d=identicon)[emteknetnz](/maintainers/emteknetnz)

---

Top Contributors

[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (25 commits)")

### Embed Badge

![Health badge](/badges/emteknetnz-vendor-code-patcher/health.svg)

```
[![Health](https://phpackages.com/badges/emteknetnz-vendor-code-patcher/health.svg)](https://phpackages.com/packages/emteknetnz-vendor-code-patcher)
```

###  Alternatives

[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
