Symfony2

Symfony2 bundles I can’t live without

I really apologize for the micropost today; I’m feeling under the weather and trying to get to bed at a decent hour. But, less talk, more lists! Here are a few Symfony2 bundles that make it into nearly ever app I create. In no particular order:

  • [ProblematicAclManagerBundle](https://github.com/Problematic/ProblematicAclManagerBundle) – Okay, I lied, there is an order: I put mine first. But after this, no favoritism. Scout’s honor. The Symfony2 ACL system is kind of bulky and awkward; I wrote this bundle (and a few great people helped out with it) to make it easier to manage user permissions on objects.
  • [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle) – Remember what I said about [Not Invented Here](http://iamproblematic.com/getting-over-the-not-invented-here-mentality/)? This is a classic example of “somebody else already did it better.” I still haven’t found a use case in which I didn’t want to use this bundle for user management.
  • [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle) – Two words: free REST API.
  • [JMSSerializerBundle](https://github.com/schmittjoh/JMSSerializerBundle) – A dependency of the FOSRestBundle; I love this serializer because I can feed it an enormous collection of entities and get back usable JSON (oh, and if anyone uses the Symfony2 serializer for anything other than JSON, I’d love to hear about it). Also: you can configure your entities to only serialize certain sets of information based on requested version. Yes, you can _version your APIs automatically._ Sweet.
  • [StofDoctrineExtensionsBundle](https://github.com/stof/StofDoctrineExtensionsBundle) – Original credit goes to the [GedmoDoctrineExtensions](https://github.com/l3pp4rd/DoctrineExtensions), Stof just made them easily available in Symfony. Automatic creation of slug fields, entity translation, change history, etc. Use it!
  • [DoctrineFixturesBundle](https://github.com/doctrine/DoctrineFixturesBundle) – If you’re not using fixtures for test data, shame on you. Or maybe not, but it makes life lots easier.
  • [SncRedisBundle](https://github.com/snc/sncRedisBundle) – This one is maybe not as universally useful as the others, but I do love me some [Redis](http://redis.io/), and this bundle leverages the [predis](https://github.com/nrk/predis) library, which I’ve never had any problems with.

So, there you have it. Some bundles that I find extremely useful. I’ll keep this list as up to date as possible, so if you have some bundles in your app stack that you just can’t live without, let me know in the comments!

4 thoughts on “Symfony2 bundles I can’t live without

  1. I definitely have to check REST bundles. I also like your ACLManagerBundle of course.
    For fixtures I’ve made a bundle to allow some YML way of loading them which allows to easily define “contexts” for loading fixtures like for example “prod”, “dev”, “test” etc … and find it much useful for testing!

  2. “If you’re not using fixtures for test data, shame on you. Or maybe not, but it makes life lots easier.” I totally agree with you!! It really saved me a lot of time and it still does. Thank you for your post!

Leave a Reply