Download the PHP package lexisother/composer-patches-regex without Composer

On this page you can find all versions of the php package lexisother/composer-patches-regex. 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 composer-patches-regex

composer-patches-regex

A Composer plugin that allows for regex replacements patches using composer-patches.

Requirements

First of all, install the package using composer require lexisother/composer-patches-regex.

You should be prompted to allow the plugin to run code, if not, add the following to your composer.json:

Defining patches

A patch looks simple. For the most part they are like regular composer-patches entries. You can read more about the general definition of patches here.

It is important to note that this plugin only supports patches defined with the expanded format.

Let's define a simple patch for a package with the following file in its root directory (vendor/scope/packagename):

We want to change the word "some" to "a bit of" and all instances of "original" to "copied". Our patch for this would look as follows:

[!NOTE]
When using the extra.regex.files key, please set the patch url to some arbitrary local file. composer-patches requires there to be a url, but we don't use it.

After running composer patches-relock and composer patches-repatch, vendor/scope/packagename/someFile would now look like this:

Options

The plugin exposes some options to change the behaviour of the patcher. All of these options should be set directly inside extra.regex.

fromUrl

Setting this option to true makes the plugin ignore the files key and instead download the JSON from the specified URL. So if you are migrating your local patches to a file that is hosted remotely, please set your patch's url field to a valid URL pointing to your file.

ignoreErrors

Setting this option to true prevents composer-patches from failing with "No available patcher was able to apply patch" if any of your patches contain errors.

License

This project is dual-licensed under the Commons Clause and the GNU AGPL.


All versions of composer-patches-regex with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
composer-plugin-api Version ^2.0
cweagans/composer-patches Version dev-main#5269693119b245e273db052f12ab23d74aca26fc
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 lexisother/composer-patches-regex contains the following files

Loading the files please wait ....