You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe I have found another bug in the library (running the latest version). The getEmitter() method does not persist the autogenerated object. As a result, every call to that method returns a separate emitter instance, meaning that events emitted from one instance will never reach the listeners which are registered to a different instance
Workaround: explicitly call $server->setEmitter(new EventEmitter()) BEFORE assigning any grants to the server. This kind of defeats the purpose of the autogeneration.
Question: Should $server->setEmitter() automatically cascade the reassignment to any registered grant types?
The text was updated successfully, but these errors were encountered:
I believe I have found another bug in the library (running the latest version). The
getEmitter()
method does not persist the autogenerated object. As a result, every call to that method returns a separate emitter instance, meaning that events emitted from one instance will never reach the listeners which are registered to a different instancehttps://github.com/thephpleague/oauth2-server/blob/master/src/EventEmitting/EmitterAwarePolyfill.php#L16
Was that intended to be a
??=
operator?Workaround: explicitly call
$server->setEmitter(new EventEmitter())
BEFORE assigning any grants to the server. This kind of defeats the purpose of the autogeneration.Question: Should
$server->setEmitter()
automatically cascade the reassignment to any registered grant types?The text was updated successfully, but these errors were encountered: