Skip to content

Conversation

@trowski
Copy link
Member

@trowski trowski commented Feb 22, 2022

A couple somewhat tangential changes:

  • Switched to using a custom error handler instead of the @ operator when calling pcntl_signal in StreamSelectDriver.
  • Removed the fiber check in the constructor of AbstractDriver, since the file won't parse in PHP versions below 8.1, it seemed pointless to retain it.

}
throw new \Error($message);
\set_error_handler(static function (int $errno, string $errstr): bool {
throw new \Error(\sprintf("Failed to register signal handler; Errno: %d; %s", $errno, $errstr));
Copy link
Member Author

Choose a reason for hiding this comment

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

Should this be a RuntimeException instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, it's not an Error.

Copy link
Member

Choose a reason for hiding this comment

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

Probably our unsupported feature exception could be used?

@trowski trowski force-pushed the php-8.1-features branch from b65f709 to 1e8bb8b Compare May 31, 2022 16:54
@WyriHaximus
Copy link
Contributor

👍 , everything I'm doing with fibers is 8.1+

@trowski trowski merged commit cf1dda6 into main May 31, 2022
@trowski trowski deleted the php-8.1-features branch May 31, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants