Attempting to use with PHP 8.1 and PHPUnit 10, and getting error:
13:08:11 user@host ~/projects/name master *
$ composer test
> @php phpunit
PHPUnit 10.3.1 by Sebastian Bergmann and contributors.
Runtime: PHP 8.1.21
Configuration: /home/user/projects/name/phpunit.xml.dist
PHP Fatal error: A never-returning function must not return in /home/user/projects/name/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php on line 91
Script @php phpunit handling the test event returned with error code 255
Tracing it back leads to function injectCallInterceptionCode() which calls:
return Generic\prependCodeToFunctions(
Utils\condense(CALL_INTERCEPTION_CODE),
Utils\condense(CALL_INTERCEPTION_CODE_VOID_TYPED),
true
);
Removing the return; from CALL_INTERCEPTION_CODE_VOID_TYPE and then adjusting Patchwork\CodeManipulation\Actions\Generic\isVoidTyped() to check for never corrects the issue, but I don't know if that would be the preferred method.
Attempting to use with PHP 8.1 and PHPUnit 10, and getting error:
Tracing it back leads to
function injectCallInterceptionCode()which calls:Removing the
return;fromCALL_INTERCEPTION_CODE_VOID_TYPEand then adjustingPatchwork\CodeManipulation\Actions\Generic\isVoidTyped()to check fornevercorrects the issue, but I don't know if that would be the preferred method.