Code Monkey home page Code Monkey logo

roadrunner-symfony's Introduction

RoadRunner <-> Symfony Bridge

Simple bridge between Symfony and RoadRunner without PSR7 layer (HttpClient).

Installation

Require this library using composer

composer req updg/roadrunner-symfony

Create psr-worker.php file and add this content to it

<?php
require __DIR__ . "/vendor/autoload.php";

if (!isset($_SERVER['APP_ENV']) && !isset($_ENV['APP_ENV'])) {
    if (!class_exists(\Symfony\Component\Dotenv\Dotenv::class)) {
        throw new \RuntimeException(
            'APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'
        );
    }
    (new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__ . '/.env');
}


$integration = new \updg\roadrunner\symfony\SymfonyIntegration(App\Kernel::class);
$bridge = new \updg\roadrunner\easy\RoadRunner($integration);
$bridge->run();

That's it! Now just run RoadRunner server.

roadrunner-symfony's People

Contributors

alex-bond avatar gemorroj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zjsxwc gemorroj

roadrunner-symfony's Issues

no release available

If no versions are tagged composer will throw a fit unless you specify a specific version or dev-master

What are the benefits?

I'm relatively new to RoadRunner ecosystem, and for a newcomer like me it's not clear why the integration approach of this package is better than the official way described in the docs (via PSR7 bridge).

I mean, I understand that is one less wrapper here. But is it the only advantage?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.