-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow class conversations #17
Conversation
Allow middleware classes as class definitions Allow save conversation steps as class definitions
@cheeghi Could you take a quick check if maybe I overlooked something? This pr aims to make Zanzara fully OOP friendly, so we can use class definitions for conversations, middleware etc. Missing tests. |
Hi, thanks for the PR. Would be useful to cover also $bot->onCommand('start', function(Context $ctx) {
// ...
})->middleware([MyMiddleware::class, 'myMethod']; the middleware class is never resolved by the container. I think there may be some trouble getting the container inside the MiddlewareCollector, but if you could take a look at this and implement a first draft we'd appreciate. |
This case should be covered by this in the ListenerCollector, right? Basically, resoving the callable before instantiate the MiddlewareCollector |
That |
Latest commit should resolve it. Removed also a reference to the React filesystem, bacause it causes errors since the library is no longer included (i guess because the php 8 support) |
Ok good, I think the |
Yeah, when disabling the react file system was not a problem. |
For how I thought about it, it's right that the application throws an error. If someone is using ReactFilesystem he/she has to add |
No description provided.