Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Added openswoole extension check compatibility #506

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Commands/HttpServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ protected function checkEnvironment()
exit(1);
}

if (! extension_loaded('swoole')) {
if (! extension_loaded('swoole') && ! extension_loaded('openswoole')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be an or statement?

...
if (! extension_loaded('swoole') or ! extension_loaded('openswoole')) {

...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arkanius thanks for your reply. Nope it will be and operator. bcoz Sometimes one of the two may be available but it does not mean that one of them missing means others is not available. when both of them are missing then we should show the message.

$this->error('Can\'t detect Swoole extension installed.');

exit(1);
Expand Down