+1 for removing them, namespaced events in the strings are much more sensible.

On Mon, 2 May 2011 12:09:12 -0700, Kris Wallsmith wrote:
I think it is misleading to the user to encourage the use of class
constants as event names. An event name is a simple string in a global
namespace while a class constant includes a namespace and class name.
I am concerned that users will create disparate class constants with
the same value, leading to a collision. For example, if
FooBar::preExecute and BarFoo::preExecute are both equal to
'preExecute' they will both trigger the same listeners when
dispatched, which will probably lead to unexpected results and some
unnecessary WTFs.

The best solution I can think of is to stop using class constants and
just use simple strings instead. This will make it clear to the user
that they are dealing with a simple string in a global namespace.

$dispatcher->dispatch('preSomethingExecute')

What do you think?
Kris

 --
 If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups "symfony developers" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to
 [email protected]
 For more options, visit this group at
 http://groups.google.com/group/symfony-devs?hl=en [1]


Links:
------
[1] http://groups.google.com/group/symfony-devs?hl=en

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to