Skip to content

Instantly share code, notes, and snippets.

@bjeavons
Created January 9, 2015 21:15
Show Gist options
  • Save bjeavons/73cc9eff9425396ec3ae to your computer and use it in GitHub Desktop.
Save bjeavons/73cc9eff9425396ec3ae to your computer and use it in GitHub Desktop.
boris quickstart for Drupal magic

You'll need boris and boris-loader and then set a boris bootstrap for your Drupal repos.

Install boris however you prefer. I have a /usr/local/bin/boris symlink to the boris vendor binary under ~/.composer

Install boris-loader. I just cloned the repos to my homedir.

Set up a Drupal bootstrap in your local Drupal dirs.

Here's mine:

⟶  ~/projects/drupal/drupal-7.32
ben@Ben ❤ cat .borisrc
<?php
require '/Users/ben/local/boris-loader/boris-loader.php';

\Boris\Loader\Loader::load($boris, array(
  new \Boris\Loader\Provider\Drupal7(),
));

In your Drupal directory type boris to spawn the PHP REPL with a bootstrapped Drupal so you can use Drupal functions as well as PHP functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment