Registry / testing / dg-bypass-finals

dg-bypass-finals

JSON →
library1.10.2phppackagistunverified

Removes final keyword from source code on-the-fly and allows mocking of final methods and classes

composer require dg/bypass-finals
INSTALL
IMPORT
SIG · DG-BYPASS-FINALS
D
dg-bypass-finals
testingphpv1.10.2
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.

BypassFinals
use DG\BypassFinals;

Enable bypassing final keywords for testing

<?php require 'vendor/autoload.php'; DG\BypassFinals::enable(); // Now you can mock final classes/methods $mock = $this->createMock(SomeFinalClass::class);
Debug
Known issues
gotchaOpCache may cache the original file before bypass is applied
fix
Disable OpCache or clear it before enabling bypass
affects: >=1.0.0
Upgrade
Version history
1.10.2latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
dg-bypass-finals — pip install dg-bypass-finals · libregistry