- JMSDiExtraBundle
- JMSSecurityExtraBundle
- BraincraftedBootstrapBundle
- HautelookAliceBundle
- UsuScryptPasswordEncoderBundle
- StofDoctrineExtensionsBundle
- PhpCssEmbed (phpcssembed filter for Assetic)
- Select2
- jQuery
- Bootstrap
- FOSUserBundle
- KnpMenuBundle
- CssMin (via natxet/CssMin)
- minify (via mrclay/minify)
- LiipFunctionalTestBundle
Base configuration is assumed to be the latest stable Symfony2 Standard defaults.
- Use
doctrine.orm.naming_strategy.underscorenaming strategy for better-looking column names (my_propertyinstead ofmyProperty)
- Assumed to be configured with
use_controller: trueindevenvironment. - Overrides
AsseticController::rendermethod to use proper cache headers. - Overrides
AssetFactoryclass to fix kriswallsmith/assetic #532. - Enables
CacheBustingWorkerwhich changes the URL of each Assetic resource when one of its source files are modified. - Enables
phpcssembedfilter which stores small images as data uri strings in the generated CSS files. - Enables
lessfilter for files matching*.less - Configured assets for Bootstrap, jQuery, and Select2.
- Enables
cssminfilter which minifies CSS using the CssMin library - Enables
jsminfilter which minifies JS using the minify library
- Enables streaming of templates with a custom
TemplateListener(not indevortestenvironments, and not for sub-requests, and only when using the@Templateannotation) - Enables the Bootstrap form theme
- Includes simple pre-configured HTML5 base template with
flushafter head, header, main, and footer - Includes partial template for subrequests which only displays the
main_contentormainblock. Example:
{{ render(controller('AcmeDemoBundle:Issue:create', { _partial: true })) }}
- Includes
form_bootstrapmacro for displaying a form with a single line of Twig. Example:
{{ flm_uberstrap.form_bootstrap(form, { style: 'horizontal', col_size: 'lg', label_col: '4', widget_col: '5' }) }}
- Simplest possible User entity
- Bootstrap adapted login/register views
- HTTP Authentication and in_memory users for test env
- Configured to use SQLite in
testenvironment (app/cache/test/db.db3) - Uses
LiipFunctionalTestBundleto effectively roll back the test database after each test - Automatically loads fixtures specified by the
flm_uberstrap.fixturesparameter (defaults toapp/Resources/fixtures.yml, can also be an array) - If you need a set of fixtures for only one test, send the
fixturessetting to theClient, these will be loaded in addition to the other fixtures (see above):
$client = static::createClient(array(), array('fixtures' => array('test_fixtures.yml')));
- Turn into distribution instead of bundle
This assumes you have a Symfony2 Standard project already set up, with minimum-stability: stable.
- Node.js (Node.js paths are configured for Ubuntu by default)
- Less (
npm install -g less)
We're not on Packagist so you have to add this repo manually first:
"repositories": [
{
"type": "vcs",
"url": "http://github.com/FLM/uberstrap-bundle"
}
]
Also we need some unstable packages, and Composer won't let us force @dev so you need to allow it explicitly yourself for some packages:
"flm/uberstrap-bundle": "@dev",
"kriswallsmith/assetic": "@dev",
"symfony/assetic-bundle": "@dev",
"usu/scrypt-password-encoder-bundle": "@dev",
"stof/doctrine-extensions-bundle": "@dev"
You most probably already have kriswallsmith/assetic and symfony/assetic-bundle added. If so, you need to replace the version with @dev for now.
Also we need to add the BraincraftedBootstrapBundle install command:
"scripts": {
"post-install-cmd": [
[...]
"Braincrafted\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::install"
],
"post-update-cmd": [
[...]
"Braincrafted\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::install"
]
}
Add to your AppKernel.php file:
// Uberstrap
new FLM\UberstrapBundle\FLMUberstrapBundle(),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
new JMS\AopBundle\JMSAopBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle($this),
new Usu\ScryptPasswordEncoderBundle\UsuScryptPasswordEncoderBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
And to the test part:
// Uberstrap
$bundles[] = new Hautelook\AliceBundle\HautelookAliceBundle();
$bundles[] = new Liip\FunctionalTestBundle\LiipFunctionalTestBundle();
Add to your config.yml:
imports:
[...]
- { resource: @FLMUberstrapBundle/Resources/config/config.yml }
Add to your config_test.yml:
imports:
[...]
- { resource: @FLMUberstrapBundle/Resources/config/config_test.yml }
Remove the security part of your security.yml and add this to the top:
imports:
- { resource: @FLMUberstrapBundle/Resources/config/security.yml }
Add to your routing.yml:
flm_uberstrap:
resource: @FLMUberstrapBundle/Resources/config/routing.yml
Run this command to generate the Bootstrap files in your app/Resources/less directory:
app/console braincrafted:bootstrap:generate
The generated variables.less file is meant for you to modify, you don't want to look like every other Bootstrap site.