On 03.08.2024 at 00:00, Nick Lockheart wrote: > I think some kind of sandboxing tools would be useful for > build/test/deployment.
There are uopz[1] and runkit7[2] available on PECL which can be used to unit-test untestable code (and more), but you are likely better off to refactor such code sooner than possible, since such extensions may easily break for new minor PHP versions (and occasionally, such breaks may not be fixable at all[3]), and often are completely broken for new major PHP versions (uopz got a completely different API for PHP 7, and runkit was even provided as new extension named runkit7). And maintainig such extensions is a PITA[4], and as such, compatibility with new PHP versions may not be available when you need it. [1] <https://pecl.php.net/package/uopz> [2] <https://pecl.php.net/package/runkit7> [3] <https://github.com/krakjoe/uopz/issues/176> [4] <https://github.com/zenovich/runkit/issues/87> Cheers, Christoph