Skip to content

Instantly share code, notes, and snippets.

@jibran
Created February 21, 2017 04:00

Revisions

  1. jibran created this gist Feb 21, 2017.
    16 changes: 16 additions & 0 deletions test.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?php

    /**
    * @file
    * Drupal minimal bootstrap.
    */

    use Drupal\Core\DrupalKernel;
    use Symfony\Component\HttpFoundation\Request;

    $autoloader = require_once 'autoload.php';

    $kernel = DrupalKernel::createFromRequest(Request::createFromGlobals(), $autoloader, 'prod');
    $kernel->loadLegacyIncludes();
    $kernel->boot();
    // Drupal code here.