Symfony bundle port of Thomas Planer's When class