This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form/Extension
Fabien Potencier 6b8617d799 merged branch fabpot/deprecated-calls (PR #6868)
This PR was merged into the master branch.

Commits
-------

ed64413 removed deprecated message in FieldType

Discussion
----------

removed deprecated messages coming for internal calls

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6407
| License       | MIT
| Doc PR        | n/a

It's probably not the cleanest code possible, but I don't see any other way to keep the type for BC and avoid the deprecated message when called internally.

That should fix the deprecated messages thrown by the Form and Validator components.

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

by stof at 2013-01-24T15:41:26Z

The cases where you should actually be warned about the deprecation of FieldType is when using ``field`` to create a field with the factory (which would not trigger the constructor)

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

by fabpot at 2013-01-24T15:46:23Z

@stof: what do you mean? That we can remove the `trigger_error()` call altogether?

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

by stof at 2013-01-24T15:49:31Z

Nobody will ever instantiate the FieldType directly as the framework is registering it (btw, you are missing the FrameworkBundle lazy registration here).
The constructor of a form type is not the right place to deprecate it as registering it does not mean it will be used in the app.

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

by fabpot at 2013-01-24T15:51:26Z

@stof: I've updated the PR to remove the `trigger_error` call.
2013-01-24 19:40:31 +01:00
..
Core removed deprecated message in FieldType 2013-01-24 16:50:46 +01:00
Csrf [Form] Fixed cannot unset string offsets in CsrfValidationListener 2012-10-27 15:29:27 +02:00
DependencyInjection Added more verbose message for exception when form types have wrong getName method 2012-07-18 12:37:22 +03:00
HttpFoundation [Form] Introduced base ExceptionInterface 2013-01-07 16:58:41 +01:00
Templating [Form] Moved FormHelper back to FrameworkBundle 2012-07-31 16:35:46 +02:00
Validator [Form] updated ValidatorExtension to avoid using a deprecated method 2013-01-24 13:42:16 +01:00