swoolefony / swoole-bundle
A Swoole bundle for Symfony.
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
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-12-20 17:40:04 UTC
README
Swoolefony is a Swoole bundle for Symfony. It provides integration via a runtime class and management via commands.
Installation
Install it using composer:
composer require swoolefony/swoole-bundle
Runtime Configuration
Add the runtime class to your composer.json
in the extra
section:
"extra": { "runtime": { "class": "Swoolefony\\SwooleBundle\\Runtime\\SwooleRuntime" } }
With the runtime in place, the default public/index.php
would be the entry point for start the application. Once it is run,
the Swoole server is started based on the provided configuration.
Swoole Configuration
The Swoole server mode, IP, and port can be controlled via environment variables:
The runtime class will look for those environment variables and use them if they exist. Otherwise it will fallback to the default values that are listed.
Request Attributes
The following attributes are available on the request class (Request->attributes
) when it is processed by Symfony:
Container Services
The following container services are available: