PHPackages                             lilaconcepts/lilaconceptsbestpracticebundle - 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. lilaconcepts/lilaconceptsbestpracticebundle

ActiveSymfony-bundle[Framework](/categories/framework)

lilaconcepts/lilaconceptsbestpracticebundle
===========================================

Simple common, starter, empty, boilerplate-bundle to show best practice bundle development for Symfony2.1. This bundle has the right directory structure, coding standards, unittests and functional tests. It uses the Travis Continuous Integration buildbot, Composer for dependency management and Twig for templating. Read the documentation and fork/clone if you wish.

7915320[11 issues](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/issues)[2 PRs](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/pulls)PHP

Since Nov 27Pushed 5y ago6 watchersCompare

[ Source](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle)[ Packagist](https://packagist.org/packages/lilaconcepts/lilaconceptsbestpracticebundle)[ RSS](/packages/lilaconcepts-lilaconceptsbestpracticebundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

What is Best Practice Bundle?
=============================

[](#what-is-best-practice-bundle)

[![Build Status](https://camo.githubusercontent.com/5e68dc5632687f1b85ca76d355266c9338976c4731733ff3cad347f6bf28e576/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4c696c61436f6e63657074732f4c696c61436f6e636570747342657374507261637469636542756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/LilaConcepts/LilaConceptsBestPracticeBundle)

This is a simple bundle to show different [best practices for Symfony Bundles](http://symfony.com/doc/current/cookbook/bundles/index.html)development. This bundle could as well be named starter-bundle, empty-bundle or boilerplate-bundle. The master-branch follows the future [Symfony 2.1 release](http://symfony.com/blog/towards-symfony-2-1-documentation) ([upgrade notes](https://github.com/symfony/symfony/blob/master/UPGRADE-2.1.md)).

Use the bundle as a reference (or cheatsheet) for your own bundles. Also look at the [documentation](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/blob/master/Resources/doc/index.rst) and comments in the source if you forgot how to do something.

Of course you can use this bundle as a "Boilerplate" or empty/starter bundle if you plan to build your own bundle. [Fork or clone this bundle](#forkclone-the-bundle-for-your-own-use) if you wish. Please search [knpBundles.com](http://knpbundles.com/) before you build a new bundle. See if something simimlar is already out there.

For active developments see the [Changelog](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/blob/master/CHANGELOG-2.1.md).

### What does this bundle do?

[](#what-does-this-bundle-do)

- uses [Composer](http://getcomposer.org/doc/) for dependancy management
- uses [Travis CI](http://about.travis-ci.org/docs/) as a build bot for continuous integration
- conforms ([and includes](#code-standards-fixer)) [coding standards](http://symfony.com/doc/current/contributing/code/standards.html) by using [fabpot/PHP-CS-Fixer](https://github.com/fabpot/PHP-CS-Fixer)
- comes with [unittests](http://symfony.com/doc/current/book/testing.html) (including [Functional tests](http://symfony.com/doc/current/cookbook/testing/doctrine.html#functional-testing) and [code-coverage](#unit--test-the-bundle))
- generates [phpDocumentor2](https://github.com/phpDocumentor/phpDocumentor2) documentation for your code
- the [directory tree structure](http://symfony.com/doc/current/cookbook/bundles/best_practices.html) advised by Symfony
- has [documentation examples](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/blob/master/Resources/doc/index.rst) based [on reStructuredText](http://symfony.com/doc/current/contributing/documentation/format.html)
- uses [Twig](http://twig.sensiolabs.org/) for [templating](http://symfony.com/doc/current/cookbook/templating/index.html)
- a customized [.gitignore](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/blob/master/.gitignore) file
- is hosted on [Github](https://github.com/) (with Service Hooks for Travis and Composer)

### Links

[](#links)

- [Best Practice Bundle on Packagist.org](http://packagist.org/packages/LilaConcepts/LilaConceptsBestPracticeBundle)
- [Best Practice Bundle on KnpBundles.com](http://knpbundles.com/LilaConcepts/LilaConceptsBestPracticeBundle)
- [Best Practice Bundle on Travis CI](http://travis-ci.org/#!/LilaConcepts/LilaConceptsBestPracticeBundle)
- [Best Practice Forum](https://groups.google.com/forum/#!forum/lila-concepts-symfony2-bestpracticebundle)
- TODO: include link to unittest code-coverage
- TODO: include link to phpDocumentor2 documentation

Bugs and Roadmap
----------------

[](#bugs-and-roadmap)

Before providing bug-reports please read the [current issues](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/issues)and [forum](https://groups.google.com/forum/#!forum/lila-concepts-symfony2-bestpracticebundle) first. The roadmap for the future of this bundle is described below.

### Future features and documentation

[](#future-features-and-documentation)

Help appreciated, see [enhancements under issues](https://github.com/LilaConcepts/LilaConceptsBestPracticeBundle/issues?labels=enhancement&page=1&state=open)). Please +1 the enhancements you are interested in.

- make /best-practice/ available for the functional test
- clone the bundle via command as an alternative to generate:bundle
- multiple languages / locale / i18n examples
- provide tutorials / blog-posts (yaml, caching with Varnish, Vagrant etc.)
- more info on cache management
- more logging (via monolog)
- more information on routing/paths, assetic and forms
- custom exceptions
- add edge side include (esi), session, validator and redirect tests
- add mime-type tests like xml and json tests
- use [phantomjs.org](http://phantomjs.org/) for javascript tests?
- Object-relational mapping (ORM): Propel/Doctrine entity integration?
- html5 boilerplate?
- make this bundle work with ZF2 too?

Requirements
------------

[](#requirements)

- Symfony2.1 (PHP 5.3.3 and up including Composer)
- Twig

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

[](#installation)

Add the following line to your composer.json file.

```
//composer.json
{
    //...

    "require": {
        //...
        "LilaConcepts/LilaConceptsBestPracticeBundle" : "dev-master"
    }

    //...
}
```

If you haven't allready done so, get Composer ([make sure it's up-to-date](http://getcomposer.org/doc/03-cli.md#self-update)).

```
curl -s http://getcomposer.org/installer | php
```

And install the new bundle

```
php composer.phar update LilaConcepts/LilaConceptsBestPracticeBundle
```

Configure
---------

[](#configure)

The final step is to add the bundle to your AppKernel.php.

```
