Removes `final` and `readonly` keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.
My usecase is: I want to use Infection which needs to have access to PHPUnit's coverage files, which are created in a folder (which is itself created with the recursive parameter set to true); see php-code-coverage Facade file.
So when I try to run Infection, the coverage files creation fails because the folders can't be created.
The third parameter of
mkdir
is a boolean which indicates if the given folder path should be created recursively.However,
false
is always given; so when some API tries to create a full path, it fails.https://github.com/dg/bypass-finals/blob/06d98c87299ce5fa6b0fc709cabdfa7ca2d04576/src/BypassFinals.php#L54-L57
My usecase is: I want to use Infection which needs to have access to PHPUnit's coverage files, which are created in a folder (which is itself created with the recursive parameter set to
true
); see php-code-coverage Facade file.So when I try to run Infection, the coverage files creation fails because the folders can't be created.
I tried to look what value is given to the
$options
parameters of the method above. Documentation says it can containSTREAM_MKDIR_RECURSIVE
, which would be a solution.In my case it contains
9
which seems to be the equivalent ofSTREAM_NOTIFY_FAILURE
.I don't know how to fix it with these information, any idea? 🙂