swoolefony / swoole-bundle
为 Symfony 提供的 Swoole 扩展包。
dev-main
2023-08-20 14:56 UTC
Requires
- php: >=8.2
- symfony/console: ^6.3
- symfony/dependency-injection: ^6.3
- symfony/framework-bundle: ^6.3
- symfony/http-foundation: ^6.3
- symfony/http-kernel: ^6.3
- symfony/runtime: ^6.3
Requires (Dev)
- mockery/mockery: ^1.6
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^10.2
- swoole/ide-helper: ~5.0.0
This package is auto-updated.
Last update: 2024-09-20 17:07:17 UTC
README
Swoolefony 是一个为 Symfony 提供的 Swoole 扩展包。它通过运行时类和命令进行集成和管理。
安装
使用 composer 安装
composer require swoolefony/swoole-bundle
运行时配置
将运行时类添加到您的 composer.json
文件的 extra
部分
"extra": { "runtime": { "class": "Swoolefony\\SwooleBundle\\Runtime\\SwooleRuntime" } }
一旦设置好运行时,默认的 public/index.php
将作为应用程序的入口点。一旦运行,Swoole 服务器将根据提供的配置启动。
Swoole 配置
可以通过环境变量控制 Swoole 服务器模式、IP 地址和端口号。
运行时类将查找这些环境变量并使用它们,如果存在的话。否则,它将回退到以下列出的默认值。
请求属性
当请求类(Request->attributes
)通过 Symfony 处理时,以下属性可用
容器服务
以下容器服务可用