If you attempt to pass a non-static method callable in, for instance: [$instance, 'methodName'] it passes the callable typehint, then gets nuked by whatever that condition block is all about, and then throws an exception about being uncallable. Why?
And attempting to pass a nested array does not pass the callable typehint. I can workaround this by passing a closure to perform the same work, but this is still an issue.
In theory this would also break static class method calls in array syntax as well, possibly leading to bizarre or even dangerous behavior if the class name is still callable or invokable.
If instance methods are unsupported or otherwise should not be used, they should be checked for properly. Please do not mangle my callable.
https://github.com/Corveda/PHPSandbox/blob/main/src/PHPSandbox.php#L2670
If you attempt to pass a non-static method callable in, for instance:
[$instance, 'methodName']
it passes the callable typehint, then gets nuked by whatever that condition block is all about, and then throws an exception about being uncallable. Why?And attempting to pass a nested array does not pass the callable typehint. I can workaround this by passing a closure to perform the same work, but this is still an issue.
In theory this would also break static class method calls in array syntax as well, possibly leading to bizarre or even dangerous behavior if the class name is still callable or invokable.
If instance methods are unsupported or otherwise should not be used, they should be checked for properly. Please do not mangle my callable.