PHPackages                             vanilla/garden - 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. [Framework](/categories/framework)
4. /
5. vanilla/garden

AbandonedArchivedLibrary[Framework](/categories/framework)

vanilla/garden
==============

The garden framework.

v0.1.0(11y ago)102121MITPHPPHP &gt;=5.4.0

Since Feb 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/vanilla/garden)[ Packagist](https://packagist.org/packages/vanilla/garden)[ RSS](/packages/vanilla-garden/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

[![Garden](https://camo.githubusercontent.com/b29d5fc947995ffd1b97b5a086cdda4bac297c6a1ad06e33ed9b42b3590a612c/687474703a2f2f63646e2e76616e696c6c61666f72756d732e636f6d2f67617264656e2d6c6f676f2d3430302e737667)](https://camo.githubusercontent.com/b29d5fc947995ffd1b97b5a086cdda4bac297c6a1ad06e33ed9b42b3590a612c/687474703a2f2f63646e2e76616e696c6c61666f72756d732e636f6d2f67617264656e2d6c6f676f2d3430302e737667)
=======================================================================================================================================================================================================================================================================================================================================================================================================================

[](#)

[![Build Status](https://camo.githubusercontent.com/c559d82894468d65dccf144b1cbe67d0858c53c6dee40df22227cb8de1b7a344/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76616e696c6c612f67617264656e2e7376673f7374796c653d666c6174)](https://travis-ci.org/vanilla/garden) [![Coverage](https://camo.githubusercontent.com/7fac1fd4526e5bae81244ead0578d2b9c32a7ab1057a6ffc7130d5e7ee177a24/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f76616e696c6c612f67617264656e2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/vanilla/garden/)

Garden is a mini framework for building pluggable web applications and apis. ***This framework is currently a work in progress and should be considered pre-alpha quality code right now.***

Howdy, Stranger!
----------------

[](#howdy-stranger)

The garden framwework was born out of our work on [Vanilla Forums](http://vanillaforums.com) over the past four years. We've built a forum that started out simple, but has grown into a massively scalable, customizable solution with hundreds of plugins and themes. Over these years we've learned a lot about what we need and what we don't need in a framework, and garden is the result.

Garden is heavily inspired by the current work being done on micro frameworks around the web, most notably the [Slim Framework](http://www.slimframework.com/). We're calling garden a *mini framework* because it has its roots in micro frameworks, but we're packing in enough functionality that it's too big to be considered micro.

Garden at a Glance
------------------

[](#garden-at-a-glance)

### Restful Routing

[](#restful-routing)

You can make a simple api by easily routing to closures or route to controllers to make a more advanced applications.

### Addons and Events

[](#addons-and-events)

Make your application extendable with garden's addon and event framework. If you are familiar with Vanilla you can think of addons as the union of plugins and applications.

Garden's `Event` object allows you to bind to events and fire events of your own. Events allow for nearly limitless customization without having to about re-implementing huge swaths of code. You can bind to just the few events you need and snipe the functionality you need.

### Object Oriented, but not too Much

[](#object-oriented-but-not-too-much)

We love objects and garden has a solid object oriented foundation. However, we believe that not everything has to be an object and that a class structure should really only go so deep. For us, developing with garden is an aesthetic experience and too much object configuration works against that goal.

### Powered by Composer

[](#powered-by-composer)

Composer is the amazing package manager that has taken the PHP world by storm. Garden is implemented as a composer package making it easy to use and combine with the thousands of composer packages out there.

### Unit Tested

[](#unit-tested)

Garden is tested with [PHPUnit](https://phpunit.de/) and [Travis CI](https://travis-ci.org/vanilla/garden). We want to make sure that garden is high quality software that doesn't break as we add new features. Our goal is to implement all reported bugs as unit tests so that they can be fixed and never happen again.

### Open Source

[](#open-source)

Garden is free, open source software distributed under the [MIT license](http://opensource.org/licenses/MIT).

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

[](#installation)

*Garden requres PHP 5.4 or higher*

Garden is [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) compliant and can be installed using [composer](//getcomposer.org). Just add `vanilla/garden` to your composer.json.

```
"require": {
    "vanilla/garden": "*"
}
```

A Basic Garden Application
--------------------------

[](#a-basic-garden-application)

Most garden applications will make use of an .htaccess file for pretty urls and then have an index.php defined as follows:

```
// Put your index.php in the Garden namespace or import the various classes you need.
namespace Garden;

// Define the root path of the application.
define('PATH_ROOT', __DIR__);

// Require composer's autoloader.
require_once __DIR__.'/vendor/autoload.php';

// Instantiate the application.
$app = new Application();

// Load the default config from conf/config.json.php.
Config::load();

// Enable addon functionality.
Addons::bootstrap(); // enables config('addons')

// Fire the bootstrap event so that overridable function files can be included.
Event::fire('bootstrap');

// Register routes to functions.
$app->route('/hello', function () use ($app) {
    echo "Hello World!";
});

// Register a route to controllers.
$app->route('/api/', '%sApiController');

// Run the application.
$app->run();
```

More to Come
------------

[](#more-to-come)

*This read-me is a work in progress.*

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% 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

Unknown

Total

1

Last Release

4119d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da29e060f227028e8ee38bb5873ba2188fb5236b20b3dffec766c768019d8bd8?d=identicon)[tburry](/maintainers/tburry)

---

Top Contributors

[![tburry](https://avatars.githubusercontent.com/u/97432?v=4)](https://github.com/tburry "tburry (302 commits)")[![DaazKu](https://avatars.githubusercontent.com/u/2412909?v=4)](https://github.com/DaazKu "DaazKu (7 commits)")[![kasperisager](https://avatars.githubusercontent.com/u/1174718?v=4)](https://github.com/kasperisager "kasperisager (1 commits)")

---

Tags

non-productionphpframeworkvanillagardenvanilla forums

### Embed Badge

![Health badge](/badges/vanilla-garden/health.svg)

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

PHPackages © 2026

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