havvg's playground

Developing Software is Fun!

Symfony: How to Bundle

Toni Uebernickel
Creating a bundle for Symfony is one of the most misunderstood topics. This topic is very old, but it got some tension in the recent past. I’ve been discussing this topic with several people using different channels for more than three years now. There are some blog postings out there...

How to extend form fields in Symfony2.1 using extensions

Toni Uebernickel
The previous post on FormTypeExtensionInterface is outdated for the current Symfony version 2.1. As requested multiple times, I want to share an updated version on how to create such an extension. The only main differences between the previous posts state and the current version are: The extensions are now using...

An example of Symfony2 CollectionType form field prototype

Toni Uebernickel
While working an a multi-step form with multiple CollectionType in it, I came across the issue requiring a generic solution for handling allow_add and allow_delete on a collection. As there is no entry on the allow_delete part in the Symfony2 documentation itself, this solution may not be the best way...

Validate emails on redirects in Symfony2 with Behat

Toni Uebernickel
Contexts Before we can actually start, we need some more step definitions. As we follow DRY(“Don’t Repeat Yourself”), we are going to use Behat\CommonContexts. There are several Contexts given, we can make use of. In particular we need two of them. The MinkRedirectContext for the redirects and SymfonyMailerContext to verify...

git rebase is not a lion, it's a cat - Part Two

Toni Uebernickel
In the previous post we took a look at the basics of git rebase The most important part we will take a deeper look in this part: The history will be re-written. As mentioned in the previous post, this is not necessarily a bad thing. To have a greater view,...