Replies: 8 comments 23 replies
-
|
Let me think and come back to you. |
Beta Was this translation helpful? Give feedback.
-
|
Regarding: "The EventDispatcher argument expects Cognesy\Utils\Events\EventDispatcher, shouldn't it expect the PSR EventDispatcherInterface so it's compatible with all event listener libraries?" Yes, probably it's the best way to make it future-proof. I aim to introduce this change in the v1.0. |
Beta Was this translation helpful? Give feedback.
-
|
Re: "SymfonyDriver expects a CanHandleHttpRequest? How is this supposed to work? Symfony's HttpClient will never implement that?" This looks like my mistake :( Let me correct this in v1.0. |
Beta Was this translation helpful? Give feedback.
-
|
Would you be able to check current (unreleased) code from main branch on instructor-php repo? It is heavily modified, but I am not releasing it yet as some work is still not finished. It should be able to support your needs, unless I miss something. Check this example using new API: Please note that HttpClient class is necessary as underlying HTTP client adapter (which provides some extra capabilities like debugging or buffering). |
Beta Was this translation helpful? Give feedback.
-
|
Yes, main is unstable - I am aware of the issues and working to fix them. |
Beta Was this translation helpful? Give feedback.
-
|
I've committed a working version, but be aware that things are still moving around. |
Beta Was this translation helpful? Give feedback.
-
|
Check this: |
Beta Was this translation helpful? Give feedback.
-
|
1.0.1-RC13 was a typo indeed. I will remove it from the repo. Thanks for flagging this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Dariusz!
I'm trying to configure Instructor to use a given Symfony HttpClient and EventDispatcher that are already registered in the DI container. So basically I have this:
Integrating it in the default Symfony world would of course allow me to register events just like I normally would in the application and you would get the benefit of all the debug helpers when using the container registered HTTP client.
However, there are some questions here:
SymfonyDriverexpects aCanHandleHttpRequest? How is this supposed to work? Symfony's HttpClient will never implement that?EventDispatcherargument expectsCognesy\Utils\Events\EventDispatcher, shouldn't it expect the PSREventDispatcherInterfaceso it's compatible with all event listener libraries?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions