Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 3d381c4

Browse files
committed
use extension_load to detect if swoole extension is installed
1 parent aa6b875 commit 3d381c4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
],
1616
"require": {
1717
"php": "^7.1",
18-
"ext-swoole": ">=1.9.3 || >=2.1.0",
1918
"illuminate/console": "~5.1",
2019
"illuminate/contracts": "~5.1",
2120
"illuminate/http": "~5.1",

src/Commands/HttpServerCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ protected function isDaemon()
313313
protected function checkEnvironment()
314314
{
315315
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
316-
throw new \RuntimeException("Swoole extension doesn't support Windows OS yet");
316+
throw new \RuntimeException("Swoole extension doesn't support Windows OS yet.");
317+
} elseif (! extension_loaded('swoole')) {
318+
throw new \RuntimeException("Can't detect Swoole extension installed.");
317319
}
318320
}
319321
}

0 commit comments

Comments
 (0)