Download the PHP package emteknetnz/vendor-code-patcher without Composer

On this page you can find all versions of the php package emteknetnz/vendor-code-patcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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

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)

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

https://github.com/silverstripe/silverstripe-admin/pull/1259.diff

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

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

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

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

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

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'


All versions of vendor-code-patcher with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^4.9 || ^5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package emteknetnz/vendor-code-patcher contains the following files

Loading the files please wait ....