Enhanced the triggering of E_USER_DEPRECATED errors

- Removed useless error handlers around FormEvent as the triggering has
  been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
  method provide some user logic needing to be converted to a new way.
- Enhanced the deprecation messages to mention the replacement whenever
  possible.
merged branch stof/enhance_deprecation (PR #6646)

This PR was merged into the master branch.

Commits
-------

68257d3 Enhanced the triggering of E_USER_DEPRECATED errors

Discussion
----------

Enhanced the triggering of E_USER_DEPRECATED errors

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Deprecations: no
Symfony2 tests pass: yes
Fixes the following tickets: none

- Removed useless error handlers around FormEvent as the triggering has
  been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
  method provide some user logic needing to be converted to a new way.
  For instance, AbstractType should trigger the error when the type extending it overwrites the deprecated methods instead of ``setDefaultOptions``, which was not the case previously.
- Enhanced the deprecation messages to mention the replacement whenever
  possible.

---------------------------------------------------------------------------

by stof at 2013-01-10T01:23:49Z

@fabpot should I remove ``Symfony\Component\Form\Test\DeprecationErrorHandler::getFormEvent`` ? It is not used anymore in the testsuite and is not needed anymore as the constructor of FormEvent does not trigger the deprecation erronously.

---------------------------------------------------------------------------

by fabpot at 2013-01-10T07:24:02Z

@stof: yes, remove it then. Thanks.

---------------------------------------------------------------------------

by stof at 2013-01-10T08:23:14Z

done