PHPackages                             code-and-commits/patch-apply - 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. code-and-commits/patch-apply

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

code-and-commits/patch-apply
============================

Generate and apply diffs to strings

0.1.0(5y ago)01ISCPHPPHP ^7.4

Since Oct 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/CodeAndCommits/patch-apply)[ Packagist](https://packagist.org/packages/code-and-commits/patch-apply)[ RSS](/packages/code-and-commits-patch-apply/feed)WikiDiscussions main Synced 3w ago

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

Patch Apply
===========

[](#patch-apply)

Apply diff files to text programmatically

Usage
-----

[](#usage)

```
$patcher = new PatchApply\Patcher();
$output = $patcher->apply($input, $diff);
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

2089d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5079595?v=4)[Anthony Porthouse](/maintainers/AnthonyPorthouse)[@AnthonyPorthouse](https://github.com/AnthonyPorthouse)

---

Top Contributors

[![AnthonyPorthouse](https://avatars.githubusercontent.com/u/5079595?v=4)](https://github.com/AnthonyPorthouse "AnthonyPorthouse (7 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/code-and-commits-patch-apply/health.svg)

```
[![Health](https://phpackages.com/badges/code-and-commits-patch-apply/health.svg)](https://phpackages.com/packages/code-and-commits-patch-apply)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[phpunit/phpunit

The PHP Unit Testing framework.

20.0k955.1M155.0k](/packages/phpunit-phpunit)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5275.9M121](/packages/symplify-monorepo-builder)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)

PHPackages © 2026

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