8000 merged branch fabpot/deprecated-calls (PR #6868) · xamado/symfony@6b8617d · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b8617d

Browse files
committed
merged branch fabpot/deprecated-calls (PR symfony#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 | symfony#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) ----------------------------------------------------------- 8000 ---------------- 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.
2 parents 7e1c528 + ed64413 commit 6b8617d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Symfony/Component/Form/Extension/Core/Type/FieldType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
*/
2323
class FieldType extends AbstractType
2424
{
25-
public function __construct()
26-
{
27-
trigger_error('FieldType is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
28-
}
29-
3025
/**
3126
* {@inheritdoc}
3227
*/

0 commit comments

Comments
 (0)
0