Loads project specific contexts into d11wtq/boris
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/Boris/Loader
tests
.gitignore
.travis.yml
LICENSE
README.md
boris-loader.php
composer.json
composer.lock
phpunit.bootstrapless.xml.dist
phpunit.xml.dist
symfony2_env_vars.md

README.md

boris-loader

Loads project specific contexts into d11wtq/boris REPL.

Currently supports Composer, Drupal, eZ Publish and Symfony.

Build Status

Usage

The easiest (and recommended) way of using boris-loader is by hooking into Boris via your .borisrc file, either in your $HOME or your current working directory. Simply clone this repository somewhere and add the following lines to your .borisrc.

<?php
require 'path/to/cloned/boris-loader.php';
\Boris\Loader\Loader::load($boris);

By default, boris-loader will try to load any Composer configuration it can find. If you are working with projects like Symfony or Drupal, you can have boris-loader look for and run their respective bootstrap.

<?php
require __DIR__.'/../../../../boris-loader.php';
\Boris\Loader\Loader::load($boris, array(
    new \Boris\Loader\Provider\Symfony2(),
    new \Boris\Loader\Provider\Composer(),
));

Providers

  • Composer: \Boris\Loader\Provider\Composer().
  • Drupal 7: \Boris\Loader\Provider\Drupal7().
  • Drupal 8: \Boris\Loader\Provider\Drupal8().
  • eZ Publish: \Boris\Loader\Provider\EzPublish().
  • Symfony2: \Boris\Loader\Provider\Symfony2().

Symfony2 provider optional arguments

You can optionally pass the Symfony environment name and debug mode to the Symfony2 provider as arguments. The arguments default to 'dev' environment and true for debug mode.

<?php
require __DIR__.'/../../../../boris-loader.php';
\Boris\Loader\Loader::load($boris, array(
    new \Boris\Loader\Provider\Symfony2('prod', false),
));

See this document for an example of using ENV vars to make this dynamic in your ~/.borisrc