dg/bypass-finals
DG\BypassFinals lets you bypass PHP’s final classes and methods at runtime so you can mock, extend, or patch code that’s otherwise locked down—useful for testing legacy dependencies. Lightweight, Composer-ready, and works with popular test frameworks.
vendor/autoload.php loads, so nothing slips through unmodified (#74, #58)proc_open() when given a ['file', ...] descriptor spec – the native wrapper no longer chokes on file-based descriptors (#43)stream_eof() now waits for an actual empty read before reporting end-of-stream, preventing truncated reads (#75, #50)is_dir() check in stream_open(), fixing stale filesystem state on cache writes (#69, #67)debugInfo() output so bypass tokens are reported correctly (#68)NativeWrapper::stream_seek() now detects whether the underlying stream is actually seekable instead of blindly seeking (#63)final keyword survive untouched (#64)T_READONLY constant polyfill for PHP < 8.1, keeping older runtimes happy (51736af)DG\BypassFinals::enable(bypassReadOnly: false);
fixed some bugs #28, #25
setWhitelist() method to allow controlling which files get replaced. (#7)final as non-keyword [Closes #4]How can I help you explore Laravel packages today?