PHPackages                             erdiko/drupal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. erdiko/drupal

ActiveLibrary

erdiko/drupal
=============

Erdiko Drupal package

7.0.5(11y ago)52003[1 issues](https://github.com/ArroyoLabs/erdiko-drupal/issues)MITPHP

Since Sep 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ArroyoLabs/erdiko-drupal)[ Packagist](https://packagist.org/packages/erdiko/drupal)[ Docs](http://erdiko.org)[ RSS](/packages/erdiko-drupal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

erdiko-drupal
=============

[](#erdiko-drupal)

Erdiko Drupal integration

Run a headless version of drupal in your MVC app!

Using this package is an easy way to run Drupal in another codebase (framework). It essentially is a convenient way to bootstrap drupal and give you access to it's API. Drupal becomes another data source. Call the drupal model or extend the drupal model and make your own headless Drupal mashup. Only requests that intiate the drupal model will load up Drupal. This can be great for performance.

```
$drupal = new \erdiko\drupal\Model; // Instantiate Drupal
$node = $drupal->node_load(1); // Load some drupal content and theme or process it how ever you like

```

Version (SemVer)
----------------

[](#version-semver)

7.0.5

Installation
------------

[](#installation)

- download drupal and put it in your erdiko root as /lib/drupal
- set up vhost for drupal (so you can access the native drupal admin)
- install drupal. Use the drupal wizzard e.g. local.drupal.erdiko.org/install.php or update settings.php file with your database credentials
- Now that drupal is set up, time to get the erdiko-drupal package. To do this simply run this on the commandline

:~$

```
composer require erdiko/drupal 7.0.*

```

- an alternative is to add erdiko/drupal to your require list in your project's composer.json file and run, "composer update".
- symlink your files folder. This will make sure that any files uploaded in drupal will be available in your erdiko site. Go to the root of your site and run the follow commands (linux &amp; OSX).

:~$

```
mkdir -p public/sites/default
cd public/sites/default
ln -s ../../../lib/drupal/sites/default/files files

```

Attach an existing Drupal site to your erdiko app
-------------------------------------------------

[](#attach-an-existing-drupal-site-to-your-erdiko-app)

copy your drupal code into /lib/drupal or add a symlink from your drupal codebase that links to /lib/drupal. The instructions are essentially the same as above except that you do not need to go through the drupal install process.

another option is to hack the drupal module itself and point the bootstrap.php to your drupal root. This is a less desireable approach. We are considering adding the path to a config file for easy directory swapping.

Run headless drupal with Laravel or Symfony
-------------------------------------------

[](#run-headless-drupal-with-laravel-or-symfony)

This erdiko/drupal package not just work with the Erdiko micro framework, it will work with any composer enabled framework, e.g. Laravel, Symfony, etc. If you are having issues using it with your framework please submit an issue and we'll see if we can help.

Demo
----

[](#demo)

The demo below is for the [Erdiko micro framework](http://erdiko.org/) but you can still borrow some code to use in your MVC of choice (e.g. Laravel or Symfony).

To add some sample demos to see erdiko/drupal in action simply add these routes to your app. Edit /app/config/application/routes.json and enter the routes below. The demos will show up as yoursite.com/drupal and yoursite.com/user

```
"drupal": "\erdiko\drupal\controllers\Example",
"drupal/:alpha": "\erdiko\drupal\controllers\Example",
"user": "\erdiko\drupal\controllers\User",
"user/:alpha": "\erdiko\drupal\controllers\User"

```

Take a look at the Example Controllers for ideas of how to leverage Drupal in your project. There are so many to leverage the Drupal CMS in an MVC web app or web service.

FAQ
---

[](#faq)

1. Why put the drupal files in /lib instead of /vendor?

    It is because the vendor folder should be for your composer libraries. Since drupal 7 and below are not composer compatible we thought it best to put it somewhere more isolated. All erdiko mash up libraries that aren't composer based should go in /lib.
2. I'm using a CDN what do I do?

    It's still a good idea to do the symlink to your files folder from your app, but it's not required. Make sure files in your native drupal site are being served from the CDN. When you are theming your content retrieved from drupal check to see if the returned file (image) url is using your CDN. If not run it through the drupal to get the CDN version of the file. $drupal-&gt;file\_create\_url($uri)
3. What about Drupal 8?

    When drupal 8 finally gets released we may have to create a new branch of the module that is 8 compatible. You would install it via, composer require 8.0.\*. Depending on how Drupal 8 matures, you may be able to directly run drupal under any framework without extra glue... only time will tell :-)
4. I found a bug, what do I do?

    Submit an issue,
5. I want to contribute

    Please fork and submit a pull request or drop us a line.

**Thank you for playing with Erdiko**

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 57.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

4266d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/691c8888935e19e59a2dd12e4e056e9b05991f4ebe696ef27fc01db8e9d1c984?d=identicon)[arroyolabs](/maintainers/arroyolabs)

---

Top Contributors

[![arroyo](https://avatars.githubusercontent.com/u/378457?v=4)](https://github.com/arroyo "arroyo (19 commits)")[![cmtk888](https://avatars.githubusercontent.com/u/5304840?v=4)](https://github.com/cmtk888 "cmtk888 (13 commits)")[![saarmstrong](https://avatars.githubusercontent.com/u/142324?v=4)](https://github.com/saarmstrong "saarmstrong (1 commits)")

---

Tags

drupalerdikoerdiko-drupalmvcphperdikoerdiko packageerdiko-drupal

### Embed Badge

![Health badge](/badges/erdiko-drupal/health.svg)

```
[![Health](https://phpackages.com/badges/erdiko-drupal/health.svg)](https://phpackages.com/packages/erdiko-drupal)
```

###  Alternatives

[erdiko/core

Erdiko micro MVC core libraries

182.5k4](/packages/erdiko-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
