sonata-project/SonataFormatterBundle — pull request #7 by TomAdam (2012-06-07 18:13:08+00:00)
Title: Patch for compatibility with 2.1

I have removed any defaults that are the same as in the parent type. This may not be desirable in all circumstances, so if anyone disagrees I'm happy to add them back in.

I have attempted to mirror the 2.0 functionality, but on review it looks like it would be better if the runtime exceptions in `'source'` and `'target'` were actually checked within `buildForm`, the `'listener'` option removed (it's not documented anyway) and the event listener only used if both `'source'` and `'target'` are populated. Something along the lines of:

```php
pool,
$options['source'],
$options['target']
);

$builder->addEventListener(FormEvents::POST_BIND, array($listener, 'postBind'));
}
}
```

Happy to change this PR if you think this is sensible.