Download the PHP package klsoft/yii3-swoole without Composer
On this page you can find all versions of the php package klsoft/yii3-swoole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download klsoft/yii3-swoole
More information about klsoft/yii3-swoole
Files in klsoft/yii3-swoole
Package yii3-swoole
Short Description The package provides the Swoole HTTP server for the Yii 3 application
License MIT
Homepage https://github.com/klsoft-web/yii3-swoole
Informations about the package yii3-swoole
YII3-SWOOLE
The package provides the Swoole HTTP server for the Yii 3 application.
See also:
- YII3-SWOOLE-DOCKER-APP - The repository contains the YII3 application template, and the additional configuration required to run the Swoole HTTP server on Docker.
Requirement
- PHP 8.2 or higher.
- Swoole PHP extension 6.2.0 or higher.
Installation
How to use
Configure the resetting of service states.
For web applications that use AssetManager, add the following to the config/web/di/application.php file:
Start the Swoole HTTP server:
Start the Swoole HTTP server using the specified options:
Restart the Swoole HTTP server:
Restart the Swoole HTTP server worker processes:
Shutdown the Swoole HTTP server:
Configuring the Swoole HTTP server.
Add the Swoole HTTP server settings to the config/common/params.php file and then restart the server:
Example:
Enable SSL:
Configuring the SwooleRequestHandlerInterface.
Configure your own version of the SwooleRequestHandlerInterface in the config/common/di/application.php file:
Use cron to start the Swoole HTTP server automatically.
Edit the crontab file:
Add the following line:
How to use with Docker
- Add the package to the
composer.json:
- Add the Dockerfile and docker-compose.yml to the root directory of a Yii3 application.
- Replace the .dockerignore file in the root directory of a Yii3 application.
- Start the application:
Open your browser to the URL http://localhost:9501
Restart the Swoole HTTP server worker processes:
Shutdown the Swoole HTTP server:
All versions of yii3-swoole with dependencies
yiisoft/aliases Version ^3.1.1
yiisoft/files Version ^2.0
yiisoft/http Version ^1.3
yiisoft/yii-console Version ^2.4.2
yiisoft/yii-runner Version ^2.2
ext-swoole Version ^6.2
ext-sysvsem Version *