zolex/reactphp-bundle

ReactPHP Bundle for Symfony

Installs: 27

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-bundle

pkg:composer/zolex/reactphp-bundle

1.0.0 2025-07-04 12:28 UTC

This package is auto-updated.

Last update: 2025-10-04 13:35:13 UTC


README

Release Version Integration Code Coverage

License Downloads

ReactPhpBundle

PHP Symfony

A Symfony Bundle providing a Runtime for ReactPHP, a PSR-17 Kernel and a Router to serve assets.

Turn any Symfony project into a "self-serving" application, no traditional webserver required.

Installation

composer require zolex/reactphp-bundle

Start the server

APP_RUNTIME="Zolex\\ReactPhpBundle\\Runtime\\ReactPhpRuntime" php public/index.php

For a very basic docker example, check the Dockerfile in the docs folder.

Assets

To allow serving assets from the public directory through ReactPHP, add this file to your project config/routes/react_bundle.yaml

reactphp_bundle:
  type: reactphp_bundle
  resource: .

By default, only files in the public/bundles directory are served (like Swagger-UI in API-Platform). Additional directories and files can be registered in the bundle config at config/bundles/zolex_react_php.yaml:

zolex_react_php:
    asset_paths:
        - /bundles/
        - /custom-dir/
        - /single-file.js
        - /another/single/file.css