Registry / testing / antecedent-patchwork

antecedent-patchwork

JSON →
library2.2.3phppackagistunverified

Method redefinition (monkey-patching) functionality for PHP.

composer require antecedent/patchwork
INSTALL
IMPORT
SIG · ANTECEDENT-PATCHWO
A
antecedent-patchwork
testingphpv2.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Patchwork
use Patchwork\Patchwork;

Monkey-patch a function at runtime

use Patchwork\Patchwork; Patchwork::replace('strtoupper', function($string) { return strtolower($string); }); echo strtoupper('Hello'); // hello
Debug
Known issues
gotchaPatchwork may cause unexpected behavior in production due to runtime method redefinition.
fix
Use only in testing or development environments.
affects: >=2.0.0
Upgrade
Version history
2.2.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
42
OpenAI (training)
1
Resources
antecedent-patchwork — pip install antecedent-patchwork · libregistry