Download the PHP package fluffydiscord/roadrunner-symfony-bundle without Composer

On this page you can find all versions of the php package fluffydiscord/roadrunner-symfony-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package roadrunner-symfony-bundle

RoadRunner Runtime for Symfony

Yet another runtime for Symfony and RoadRunner.

Installation

Usage

  1. Define the environment variable APP_RUNTIME in .rr.yaml and set up rpc plugin:

.rr.yaml

Don't forget to add the RR_RPC to your .env:

  1. Replace MicroKernelTrait with RoadRunnerMicroKernelTrait in your Kernel.php:

The default behavior of Symfony's kernel is to reset your services before request is handled and slows down the initial reaction time.

When new request arrives Your app After response was sent back
Symfony does a reset, if something fails here, request may be lost waits for reset to be done, then handles your request
RoadRunnerBundle immediately handles your request does a reset

You might want to manually refresh Doctrine connections before each request is handled you are using Mysql, MariaDB or other database that cannot handle long/persistent connection. For this, it's up to you to create event listener for WorkerRequestReceivedEvent

Configuration

fluffy_discord_road_runner.yaml

Running behind a load balancer or a proxy

If you want to use REMOTE_ADDR as trusted proxy, replace it with private_ranges instead or else your trusted headers will not work.

Symfony is using the $_SERVER['REMOTE_ADDR'] to find out the proxy address, but in the context of RoadRunner, $_SERVER contains only environment variables and the REMOTE_ADDS is missing.

Response/file streaming

Build-in full support for Symfony's BinaryFileResponse and StreamedJsonResponse. The StreamedResponse needs one little change to be fully streamable - you have to change the callback to a \Generator, replacing all echo with yield. Look at the example:

Sentry

Built in support for Sentry. Just install & configure it as you normally do.

Centrifugo (websockets)

To enable Centrifugo you need to add roadrunner-php/centrifugo package.

Bundle is using Symfony's Event dispatcher. You can create event listener for any event extending FluffyDiscord\RoadRunnerBundle\Event\Centrifugo\CentrifugoEventInterface:

Example usage:

Be aware that if you do not set any response, bundle will send DisconnectResponse back by default.

Developing with Symfony and RoadRunner

OptionsResolver (Forms)

Symfony caches OptionsResolver::setDefaults() calls, so they resolve only once for current worker when someone uses them for the first time.

This may lead to sharing sensitive information across requests in the context of a single worker, if you do not use defaults correctly.

Consider this Form, which has major flaw that will leak user email to subsequent requests that worker receives.

You should really use only static/stateless default values and dynamic options should be passed when OptionsResolver is used, or form is being created, eg:

Debugging (recommendations)

With RoadRunner you cannot simply dump and die, because nothing will be printed. I would like to introduce Buggregator to work around that. As a bonus it can also work as a mailtrap or testing Sentry locally

Credits

Inspiration taken from existing solutions like Baldinof's Bundle and Nyholm's Runtime


All versions of roadrunner-symfony-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
nyholm/psr7 Version ^1.8
spiral/roadrunner Version ^v2024
symfony/dependency-injection Version ^7.0 || ^6.4 || ^5.4
symfony/http-kernel Version ^7.0 || ^6.4 || ^5.4
symfony/psr-http-message-bridge Version ^7.0 || ^6.4 || ^2.3
symfony/runtime Version ^7.0 || ^6.4 || ^5.4
symfony/framework-bundle Version ^7.0 || ^6.4 || ^5.4
symfony/event-dispatcher Version ^7.0 || ^6.4 || ^5.4
spiral/roadrunner-worker Version ^v3
spiral/roadrunner-http Version ^v3
spiral/roadrunner-cli Version ^v2.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fluffydiscord/roadrunner-symfony-bundle contains the following files

Loading the files please wait ....