Giter VIP home page Giter VIP logo

repl-bundle's Introduction

REPL bundle


Important: This bundle is no longer under active development. Consider using PsyshBundle as an alternative.


Provides a repl command for the Symfony console, powered by Boris.

Installation

Add as a development dependency to composer.json:

composer require --dev 99designs/repl-bundle

Register the bundle in app/AppKernel.php:

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // all your run-time bundles
        );

        if ($this->getEnvironment() == 'dev') {
            $bundles[] = new NinetyNine\Bundle\ReplBundle();
        }

        return $bundles;
    }
}

Usage

Run via the Symfony console:

app/console repl

The following variables are imported into the global namespace:

  • $kernel: Application kernel
  • $container: The DI container

Issues

Boris depends on PHP's process control extension. Even if this is installed, you may see errors like this:

PHP Warning:  pcntl_fork() has been disabled for security reasons in /my-project/vendor/d11wtq/boris/lib/Boris/Boris.php on line 148
PHP Notice:  fwrite(): send of 1 bytes failed with errno=32 Broken pipe in /my-project/vendor/d11wtq/boris/lib/Boris/EvalWorker.php on line 205

If you see these errors, you'll need to edit your PHP CLI configuration (typically found at /etc/php5/cli/php.ini) to allow invocation of the named functions.

repl-bundle's People

Contributors

arthens avatar harto avatar navitronic avatar sinamt avatar

Watchers

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

Forkers

isabella232

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.