8000 removed deprecated messages coming for internal calls by fabpot · Pull Request #6868 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

removed deprecated messages coming for internal calls #6868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2013

Conversation

fabpot
Copy link
Member
@fabpot fabpot commented Jan 24, 2013
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.

@stof
Copy link
Member
stof commented Jan 24, 2013

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)

@fabpot
Copy link
Member Author
fabpot commented Jan 24, 2013

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

@stof
Copy link
Member
stof commented Jan 24, 2013

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.

@fabpot
Copy link
Member Author
fabpot commented Jan 24, 2013

@stof: I've updated the PR to remove the trigger_error call.

fabpot added a commit that referenced this pull request Jan 24, 2013
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.
@fabpot fabpot closed this Jan 24, 2013
@fabpot fabpot merged commit ed64413 into symfony:master Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0