Skip to content
Symfony2 Bundle that powers the blog
PHP JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Blog Add CategoryController and respective urls/views and such
BlogBundle Add CategoryController and respective urls/views and such
DateTime Refactored Immutable DateTime to be much simpler and nicer.
Tests Adjust bunch of stuff, make forms work and such
Util Add Restructred Text support in backend Write Post dialog, add Code-B…

This bundle is out of date and unmaintained.

Whitewashing Blog

Whitewashing is my blog and a playground for symfony2 application development.

Notice: This bundle was last tested with Symfony Beta 3 and is not guaranteed to work with any other release.


Required Third-Party Libraries

  • Zeta Components (Specifically ezcDocument for ReStructured Text to HTML Conversion)
  • Zend Framework 1.9 - 1.11 (or Zend_Feed_Writer)
  • GeShi (For Code highlighting)

Recommended practice: Install first two via PEAR ( and and the last download the last. Include all three in the autoload.php:

require_once "ezc/Base/base.php";
spl_autoload_register(array("ezcBase", "autoload"));

require_once __DIR__.'/../vendor/geshi/geshi.php';

require_once "Zend/Loader/Autoloader.php";

Required Bundles

  • DoctrineBundle (Symfony Core)
  • SecurityBundle (Symfony Core)

Optional Bundles

  • FOS UserBundle - Integrates well and an user entity is provided if you only want to use the blog bundle and don't have an application bundle.


Add the following submodule to your symfony2 project:

git submodule add git:// src/Whitewashing
git submodule update --init

Add Whitewashing and ZF1 to your app/autoload.php

$loader = new UniversalClassLoader();
    // ..
    'Whitewashing'                   => $srcDir,

require_once 'Zend/Loader/Autoloader.php';

Register the bundle in your AppKernel#registerBundles method:

new Whitewashing\BlogBundle\WhitewashingBlogBundle(),

Load the whitewashing extension in your app configuration (app/config/config.yml).

  default_blog_id:   1

Configure doctrine by adding the mapping directory:

        type: xml
        prefix: Whitewashing\Blog

If you already have a firewall and provider defined you only need to restrict the access to the admin area:

    # ...
        - { path: /blog/admin.*, role: ROLE_USER }

If you haven't done so you also have to configure the security details to secure the admin area:

            id: fos_user.user_manager
            pattern: /.*
              check_path: /login-check
              login_path: /login
              provider:   fos_user
            anonymous: true
        - { path: /blog/admin.*, role: ROLE_USER }

If you don't have an application besides this blog you can also use the security user shipped. The blog is independent from the FOS UserBundle though, you can integrate it with any security provider.

    db_driver: orm
            user: Whitewashing\BlogBundle/Security/User

And the following information to your routing.yml:

    resource: "@WhitewashingBlogBundle/Resources/config/routing.yml"

You can then create all the required database tables by using the symfony console doctrine commands and access the Schema-Tool.

You have to login into the backend now and add an author you can post with. An author is always attached to a single user account that is registered with your authentication provider. If you are using the FOS User bundle you can even pick from the list of available users via autocomplete.


To enable commenting you have to register with Disqus and add the disqus shortname to your whitewashing configuration:
    disqus_shortname: my_disqus_shortname


Whitewashing Blog Bundle defaults to using "::layout.html.twig" as layout. There is an example layout in Resources/views/layout_example.html.twig that shows all the current widgets and elements that you can use and render.


  • Rewrite Controllers to use Dependency Injection container
  • Add Blog/Article entity
  • Add functional tests for controllers
Something went wrong with that request. Please try again.