mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
misc updates
This commit is contained in:
parent
0d14e906f8
commit
c8bbf8208f
@ -2,6 +2,9 @@
|
||||
|
||||
namespace Amp;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnoreStart
|
||||
*/
|
||||
try {
|
||||
if (@assert(false)) {
|
||||
// PHP7 production environment (zend.assertions=0, assert.exception=0)
|
||||
@ -14,3 +17,6 @@ try {
|
||||
// PHP7 dev environment (zend.assertions=1, assert.exception=1)
|
||||
eval("namespace Amp; final class Deferred implements Promisor { use PrivatePromisor; }");
|
||||
}
|
||||
/**
|
||||
* @codeCoverageIgnoreEnd
|
||||
*/
|
@ -25,7 +25,7 @@ class EvReactor implements ExtensionReactor {
|
||||
public function __construct($flags = null) {
|
||||
if (!extension_loaded("ev")) {
|
||||
throw new \RuntimeException(
|
||||
"The ev extension is required to use the EvReactor."
|
||||
"The pecl ev extension is required to use the EvReactor."
|
||||
);
|
||||
}
|
||||
$flags = $flags ?: Ev::FLAG_AUTO;
|
||||
|
@ -22,8 +22,10 @@ class LibeventReactor implements ExtensionReactor {
|
||||
private static $instanceCount = 0;
|
||||
|
||||
public function __construct() {
|
||||
if (!extension_loaded('libevent')) {
|
||||
throw new \RuntimeException('The pecl-libevent extension is required to use the LibeventReactor.');
|
||||
if (!extension_loaded("libevent")) {
|
||||
throw new \RuntimeException(
|
||||
"The pecl libevent extension is required to use the LibeventReactor."
|
||||
);
|
||||
}
|
||||
|
||||
$this->base = event_base_new();
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
namespace Amp;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @TODO remove code coverage ignore once we're able to install php-uv on travis
|
||||
*/
|
||||
class UvReactor implements ExtensionReactor {
|
||||
private $loop;
|
||||
private $lastWatcherId = "a";
|
||||
@ -24,8 +28,10 @@ class UvReactor implements ExtensionReactor {
|
||||
private static $instanceCount = 0;
|
||||
|
||||
public function __construct() {
|
||||
if (!extension_loaded('uv')) {
|
||||
throw new \RuntimeException('php-uv extension is required to use the UvReactor.');
|
||||
if (!extension_loaded("uv")) {
|
||||
throw new \RuntimeException(
|
||||
"The php-uv extension is required to use the UvReactor."
|
||||
);
|
||||
}
|
||||
|
||||
$this->loop = uv_loop_new();
|
||||
|
Loading…
Reference in New Issue
Block a user