定制 roadrunner/http-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

roadrunner/http-bundle

Composer 安装命令:

composer require roadrunner/http-bundle

包简介

Integration roadrunner http with symfony

README 文档

README

RoadRunner is a high-performance PHP application server and process manager, designed with extensibility in mind through its utilization of plugins.

Features

  • Middleware
  • Supported streaming response
  • Sentry: Push/pop scope (if the SentryBundle use)
  • Doctrine: clear opened managers and check connection is still usable after each request ( if DoctrineBundle is use)

Requirements:

  • php >= 8.1
  • symfony >= 6.0
  1. Connect recipes

See link recipies repository

  1. Install package
composer req http
  1. Configure:
  • docker-compose-roadrunner.yml
  • Dockerfile
  • .rr.http.yaml
  • config/packages/roadrunner.http.yaml

Sentry integrations

Install packages:

composer require sentry

If SentryBundle is use, the following parameters is available to you:

  • useSentryIntegration - Connect integration

Example config:

Specific worker

road_runner_http:
  useSentryIntegration: true

Doctrine integrations

Install packages:

composer require orm

If DoctrineBundle is use, the following parameters is available to you:

  • useDoctrineIntegration - Connect integration
  • useLoggingDoctrineOpenTransaction - Connect middleware that report unclosed transaction to monolog
  • useTrackingSentryDoctrineOpenTransaction - Connect middleware that report unclosed transaction to sentry

These parameters accept a list of entity-managers

Example config:

road_runner_http:
  useDoctrineIntegration:
    - default
    - test

  useLoggingDoctrineOpenTransaction:
    - default
    - test

  useTrackingSentryDoctrineOpenTransaction:
    - default

Streamed Response

The bundle supports the standard Symfony responses:

Symfony\Component\HttpFoundation\StreamedResponse
Symfony\Component\HttpFoundation\StreamedJsonResponse

It also provides its own optimized implementations:

Roadrunner\Integration\Symfony\Http\Bridge\HttpFoundation\StreamedResponse
Roadrunner\Integration\Symfony\Http\Bridge\HttpFoundation\StreamedJsonResponse

We recommend using the Roadrunner\Integration\Symfony implementations whenever possible, as they eliminate unnecessary I/O overhead and offer better performance in the RoadRunner environment.
At the same time, full backward compatibility with the standard Symfony responses is preserved, ensuring that third-party libraries built for Symfony\Component\HttpFoundation continue to work seamlessly.

Examples of use:

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 48
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 48
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-19