drufony/kernel-module

Symfony Kernel inside a Drupal site

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 0

Type:drupal-module

dev-master / 7.0.x-dev 2015-08-07 23:41 UTC

This package is auto-updated.

Last update: 2022-06-11 22:29:47 UTC


README

Embed a Symfony Kernel in your Drupal application. When a site visitor requests a Symfony route, the kernel handles the request inside a Drupal page callback.

Normal page delivery can be short circuited entirely so that the Symfony response is always sent, but the normal arrangement is that HTML responses are embedded inside Drupal pages as the $content variable in page.tpl.php. Non-HTML responses are sent directly to the user.

Usage

Implement hook_kernel_info() and name your Symfony kernel app (only one is supported).

The kernel class must be autoloadable (unlike in Symfony's front controllers which include it). Put it in a module's info file.

name = My awesome Symfony application
core = 7.x
dependencies[] = kernel
files[] = app/AppKernel.php

The app and src directories in this module are a starting point for your own project.

Use drush app to use your Symfony kernel's console commands.

To do

Known issues

  • Symfony web profiler should be disabled in your kernel. It cannot offer an accurate picture of your requests and responses anyway!
  • Assetic is hard to use. You can't use the Assetic controller, but you can dump assets and use them from Drupal. Documentation forthcoming.

Screenshots

Drupal running the Symfony Acme Demo bundle

Output of drush app