8000 [FrameworkBundle] add the old method naming convention by schmittjoh · Pull Request #1162 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] add the old method naming convention #1162

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
Jun 4, 2011

Conversation

schmittjoh
Copy link
Contributor

No description provided.

@stloyd
Copy link
Contributor
stloyd commented May 31, 2011

Maybe add debug message about that the old naming convention is deprecated?

@stof
Copy link
Member
stof commented May 31, 2011

@stoyld How would you add a message ? This work is done at compile time so you cannot access the logger.

@stloyd
Copy link
Contributor
stloyd commented May 31, 2011

My bad. Then this should throw an exception with message that user is probably calling event with old format and need to add missing attribute.

@fabpot
Copy link
Member
fabpot commented May 31, 2011

That works for CoreEvents but not for the other core events.

@fabpot
Copy link
Member
fabpot commented Jun 1, 2011
    return array(
        FormEvents::PRE_SET_DATA => 'preSetData',
        FormEvents::PRE_BIND => 'preBind',
        FormEvents::BIND_NORM_DATA => 'onBindNormData',
    );

But the point is that I don't think it adds any value. Without defining the method attribute, the developer must "guess" the method name he needs to use. That adds code and documentation for no real added benefit.

@fabpot fabpot merged commit bee6a48 into symfony:master Jun 4, 2011
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.

4 participants
0