8000 Merge pull request #156 from WyriHaximus-labs/ext-event_FEATURE_FDS_e… · Undefined-Variables/event-loop@534ce37 · GitHub
[go: up one dir, main page]

Skip to content

Commit 534ce37

Browse files
authored
Merge pull request reactphp#156 from WyriHaximus-labs/ext-event_FEATURE_FDS_enabled_by_default
ExtEventLoop: Remove optional EventBaseConfig and make FEATURE_FDS enabled by default
2 parents e295575 + 1b5e939 commit 534ce37

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/ExtEventLoop.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ final class ExtEventLoop implements LoopInterface
3636
private $signals;
3737
private $signalEvents = array();
3838

39-
public function __construct(EventBaseConfig $config = null)
39+
public function __construct()
4040
{
41+
$config = new EventBaseConfig();
42+
$config->requireFeatures(EventBaseConfig::FEATURE_FDS);
43+
4144
$this->eventBase = new EventBase($config);
4245
$this->futureTickQueue = new FutureTickQueue();
4346
$this->timerEvents = new SplObjectStorage();

tests/ExtEventLoopTest.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ public function createLoop($readStreamCompatible = false)
1616
$this->markTestSkipped('ext-event tests skipped because ext-event is not installed.');
1717
}
1818

19-
$cfg = null;
20-
if ($readStreamCompatible) {
21-
$cfg = new \EventConfig();
22-
$cfg->requireFeatures(\EventConfig::FEATURE_FDS);
23-
}
24-
25-
return new ExtEventLoop($cfg);
19+
return new ExtEventLoop();
2620
}
2721

2822
public function createStream()

0 commit comments

Comments
 (0)
0