tourze / workerman-server-bundle
Workerman + Symfony
1.1.0
2025-04-25 02:57 UTC
Requires
- php: ^8.1
- ext-fileinfo: *
- ext-pcntl: *
- ext-posix: *
- league/mime-type-detection: ^1.0
- nyholm/psr7: ^1.8.2
- psr/http-factory: ^1.0
- psr/http-message: ^1.1 || ^2.0
- psr/http-server-handler: ^1.0
- psr/log: ^3|^2|^1
- symfony/config: ^6.4
- symfony/console: ^6.4
- symfony/dependency-injection: ^6.4
- symfony/framework-bundle: ^6.4
- symfony/http-foundation: ^6.4
- symfony/http-kernel: ^6.4
- symfony/process: ^6.4
- symfony/psr-http-message-bridge: ^6.4
- symfony/service-contracts: ^3.5
- symfony/yaml: ^6.4 || ^7.1
- tourze/backtrace-helper: ~0.0.5
- tourze/psr15-chain-request-handler: 0.0.*
- tourze/psr15-symfony-request-request-handler: 0.0.*
- tourze/symfony-runtime-context-bundle: 0.0.*
- tourze/workerman-file-monitor: 0.0.*
- tourze/workerman-process-worker: 0.0.*
- tourze/workerman-runtime-context-bundle: 0.0.*
- workerman/coroutine: ^1.1
- workerman/psr7: ^2.0
- workerman/workerman: ^5.1
Requires (Dev)
- maglnet/composer-require-checker: ^4
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.0
README
Make symfony application faster, with less (or none) change.
Available Request Handlers
SymfonyRequestHandler
Handles requests by passing them to the Symfony HttpKernel.
StaticFileRequestHandler
Serves static files from the public directory.
HealthCheckRequestHandler
Provides a simple health check endpoint at /health
.
ChainRequestHandler
Chains multiple request handlers. If a handler returns a 404 response, the request is passed to the next handler in the chain.
Example:
use Tourze\PSR15ChainRequestHandler\ChainRequestHandler;use Tourze\PSR15HealthCheckRequestHandler\HealthCheckRequestHandler;use Tourze\PSR15SymfonyRequestHandler\SymfonyRequestHandler;use Tourze\WorkermanServerBundle\RequestHandler\StaticFileRequestHandler; // Create handlers $healthCheckHandler = new HealthCheckRequestHandler(); $staticFileHandler = new StaticFileRequestHandler($kernel); $symfonyHandler = new SymfonyRequestHandler($kernel, $foundationFactory, $messageFactory, $logger); // Chain them together $chainHandler = new ChainRequestHandler([ $healthCheckHandler, $staticFileHandler, $symfonyHandler, ]);