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
Note that downloader request middleware gets run after spider request middleware. The exception to this are the initial requests, which don’t get sent through the spider middleware at all.
and that
Downloader response middleware gets run immediately after a response was received. This means it gets run before any spider response middleware.
(which I only saw upon writing this issue), I suggest making this less confusing. Perhaps a code refactoring should be done: why two interface namespaces if they could be simplified to one?
How I stumbled upon this, is my IDE suggesting that both namespaces could be used.
The text was updated successfully, but these errors were encountered:
I don't really see how these two namespaces can be consolidated into one. The respective middleware runs at a different part of the life cycle so they are definitely two separate things. This also would be a breaking change which I don't think is worth it.
A separate issue could be opened for roach-php/core, wherein code refactoring is suggested.
The documentation at https://roach-php.dev/docs/downloader-middleware states:
Then example code is provided,
Note the namespace of
RequestMiddlewareInterface
.Further down, the documentation states:
Then example code is provided,
Note again the namespace, this time of
ResponseMiddlewareInterface
.Apparently there is:
Although there is the disclaimer that
and that
(which I only saw upon writing this issue), I suggest making this less confusing. Perhaps a code refactoring should be done: why two interface namespaces if they could be simplified to one?
How I stumbled upon this, is my IDE suggesting that both namespaces could be used.
The text was updated successfully, but these errors were encountered: