rutek / swoole-polyfill
Polyfill for basic Swoole methods which allows you to create scripts which will run both with and without Swoole
Installs: 37
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/rutek/swoole-polyfill
Requires
- php: ^7.2
 
Requires (Dev)
- phpunit/phpunit: ^8.4
 
Suggests
- ext-swoole: Allows for async processing using this application
 
This package is auto-updated.
Last update: 2025-10-10 23:43:49 UTC
README
Polyfill for basic Swoole methods which allows you to create scripts which will run both with and without Swoole.
Currently contains polyfills for (version 4.1+):
\Swoole\Runtime::enableCoroutine()\Swoole\Coroutine\Scheduler-add&startfunctions
Feel free to create merge requests with more methods and classes! :)
Running tests
You should do two types of tests:
- one with PHP 7.2+ which does not have Swoole extension
 - one with PHP 7.2+ with Swoole extension
 
Why? First run will make sure that polyfills work properly and second one will tell you if your tests match behaviour of Swoole.