-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError : fclose(): supplied resource is not a valid stream resource #67
Comments
What do you think of? #68 |
Can you provide a code example of how to trigger the issue? |
Just to be clear. I was using 2.6.1 and after upgrading to 2.7.1 I started getting |
I can't come up with any way that that a descriptor should be in that array and an open valid stream resource. Are you using any sort of test parallelizers or such? |
Yes, I'm using. But, I think I may found out why I'm the only one having this issue. I'm calling |
<?php
declare(strict_types=1);
use donatj\MockWebServer\MockWebServer;
use PHPUnit\Framework\TestCase;
class ExampleTest extends TestCase
{
public function setUp(): void
{
$this->server = new MockWebServer();
$this->server->start();
}
public function tearDown(): void
{
$this->server->stop();
$this->server->stop();
}
public function testValid(): void
{
self::assertTrue(true);
}
} |
You know, that's the one thing I didn't think of. That would do it. I will fix that! |
Published a release with a fix and a regression test ;) Thanks for the report! https://github.com/donatj/mock-webserver/releases/tag/v2.7.2 |
Thank you! |
I don't think
@fclose($descriptor);
atsrc/MockWebServer.php#L135
is working.Maybe wrap in an empty try/catch?
The text was updated successfully, but these errors were encountered: