Skip to content

Instantly share code, notes, and snippets.

@dantleech
Created January 12, 2018 10:22
Show Gist options
  • Save dantleech/52de5195364ef5127230b763fabcf5ab to your computer and use it in GitHub Desktop.
Save dantleech/52de5195364ef5127230b763fabcf5ab to your computer and use it in GitHub Desktop.
Drupal 8 autoloader bootstrap for Phpactor
<?php
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Database\Database;
$autoload = require __DIR__ . '/autoload.php';
$kernel = new DrupalKernel('prod', $autoload);
$kernel->setSitePath(__DIR__);
$request = Request::createFromGlobals();
$kernel = DrupalKernel::createFromRequest($request,$autoload, 'prod' );
$kernel->boot();
return $autoload;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment