PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Symfony-Reloaded.org: Bundle Best Practices

Note: This article was originally published at PHPDeveloper on 8 July 2010.
PHPDeveloper

On the Symfony-Reloaded site (the site for the upcoming Symfony2 version of the framework) there's a recently updated page talking about bundle best practices to use when creating these standardized, easy-to-install packages.

A bundle is a directory that has a well-defined structure and can host anything from classes to controllers and web resources. Even if bundles are very flexible, you should follow some best practices if you want to distribute them.

There's a few standards they lay out concerning the bundle naming scheme (namespacing), the directory structure that'd need to be used (including a "resources" and "controller" directory) and where classes, third-party library use, documentation, templates, configuration and tests should fit in the structure.