amphp / process

An async process dispatcher for Amp.
MIT License
229 stars 32 forks source link

Doesn't work with dg/bypass-finals #67

Closed ostrolucky closed 1 year ago

ostrolucky commented 1 year ago

Create this bootstrap code and use it in phpunit, then rerun the tests in this project:

<?php

declare(strict_types=1);

require_once __DIR__ . '/../vendor/autoload.php';

\DG\BypassFinals::enable();

This results in

EEEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEESFE                           39 / 39 (100%)

Time: 00:00.036, Memory: 10.00 MB

There were 36 errors:

1) Amp\Process\Test\ProcessTest::testIsRunning
Amp\Process\ProcessException: Process could not be started: Errno: 2; fseek(): Stream does not support seeking
...

In case there isn't anything that can be done about the compatibility, can you at least throw the useful message when its presence is detected? Because finding the culprit isn't easy in large project.

kelunik commented 1 year ago

I'm not willing to spend time on something that interferes in such a way with packages. I think this should be reported to that library instead. It obviously does more than bypassing final then.