René's URL Explorer Experiment


Title: Inconsistency in middleware docs · Issue #13 · roach-php/roach-php.dev · GitHub

Open Graph Title: Inconsistency in middleware docs · Issue #13 · roach-php/roach-php.dev

X Title: Inconsistency in middleware docs · Issue #13 · roach-php/roach-php.dev

Description: 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: Downloader middleware that process outgoing requests before they ge...

Open Graph Description: 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: Downloader middleware that ...

X Description: 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: Downloader middleware that ...

Opengraph URL: https://github.com/roach-php/roach-php.dev/issues/13

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistency in middleware docs","articleBody":"_A separate issue could be opened for [roach-php/core](https://github.com/roach-php/core), wherein code refactoring is suggested._\r\n\r\nThe documentation at https://roach-php.dev/docs/downloader-middleware states:\r\n\r\n\u003e Downloader middleware that process outgoing requests before they get sent need to implement `RequestMiddlewareInterface`.\r\n\r\nThen example code is provided,\r\n```php\r\nuse RoachPHP\\Downloader\\Middleware\\RequestMiddlewareInterface;\r\nuse RoachPHP\\Http\\Request;\r\nuse RoachPHP\\Support\\Configurable;\r\n\r\nclass MyRequestMiddleware implements RequestMiddlewareInterface\r\n{\r\n    // ...\r\n}\r\n```\r\nNote the namespace of `RequestMiddlewareInterface`.\r\n\r\nFurther down, the documentation states:\r\n\r\n\u003e Downloader middleware that deal with responses need to implement `ResponseMiddlewareInterface`.\r\n\r\nThen example code is provided,\r\n```php\r\nuse RoachPHP\\Http\\Response;\r\nuse RoachPHP\\Spider\\Middleware\\ResponseMiddlewareInterface;\r\nuse RoachPHP\\Support\\Configurable;\r\n\r\nclass MyResponseMiddleware implements ResponseMiddlewareInterface\r\n{\r\n    // ...\r\n}\r\n```\r\nNote again the namespace, this time of `ResponseMiddlewareInterface`.\r\n\r\nApparently there is:\r\n```php\r\nuse RoachPHP\\Downloader\\Middleware\\RequestMiddlewareInterface;\r\nuse RoachPHP\\Spider\\Middleware\\RequestMiddlewareInterface;\r\n\r\nuse RoachPHP\\Downloader\\Middleware\\ResponseMiddlewareInterface;\r\nuse RoachPHP\\Spider\\Middleware\\ResponseMiddlewareInterface;\r\n```\r\n\r\nAlthough there is the disclaimer that\r\n\u003e Note that downloader request middleware gets run after [spider request middleware](https://roach-php.dev/docs/spider-middleware#request-middleware). The exception to this are the [initial requests](https://roach-php.dev/docs/spiders#generating-the-initial-requests), which don’t get sent through the spider middleware at all.\r\n\r\nand that\r\n\u003e Downloader response middleware gets run immediately after a response was received. This means it gets run before any [spider response middleware](https://roach-php.dev/docs/spider-middleware#response-middleware).\r\n\r\n(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?\r\n\r\nHow I stumbled upon this, is my IDE suggesting that both namespaces could be used.","author":{"url":"https://github.com/pedzed","@type":"Person","name":"pedzed"},"datePublished":"2023-05-25T07:04:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/13/roach-php.dev/issues/13"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f7e2add7-18d8-1b19-c27a-78042586a49a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB158:1F80F:2A9BB70:3679E96:6991C78A
html-safe-noncedc36f9c68ebf740c53b22565909ee04517dad7152b2ad8bb9717ad65171633f3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTU4OjFGODBGOjJBOUJCNzA6MzY3OUU5Njo2OTkxQzc4QSIsInZpc2l0b3JfaWQiOiIzNjM4Mjk0MzQ2MTMyOTk4MDI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8e5ac7efc2b7adf1a3f21ef15c00f3a997e53007b7ff4bb8e9fad03371945c82
hovercard-subject-tagissue:1725217032
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/roach-php/roach-php.dev/13/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8f2ea81fbbb7c7af4e89dcffa331a0ea20151c9f20a87086d2587a8ab37ce63d/roach-php/roach-php.dev/issues/13
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8f2ea81fbbb7c7af4e89dcffa331a0ea20151c9f20a87086d2587a8ab37ce63d/roach-php/roach-php.dev/issues/13
og:image:altA 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: Downloader middleware that ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepedzed
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/roach-php/roach-php.dev git https://github.com/roach-php/roach-php.dev.git
octolytics-dimension-user_id88873474
octolytics-dimension-user_loginroach-php
octolytics-dimension-repository_id397134365
octolytics-dimension-repository_nworoach-php/roach-php.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id397134365
octolytics-dimension-repository_network_root_nworoach-php/roach-php.dev
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues/13#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Froach-php%2Froach-php.dev%2Fissues%2F13
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Froach-php%2Froach-php.dev%2Fissues%2F13
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=roach-php%2Froach-php.dev
Reloadhttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues/13
Reloadhttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues/13
Reloadhttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues/13
roach-php https://patch-diff.githubusercontent.com/roach-php
roach-php.devhttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev
Please reload this pagehttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues/13
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Froach-php%2Froach-php.dev
Fork 12 https://patch-diff.githubusercontent.com/login?return_to=%2Froach-php%2Froach-php.dev
Star 10 https://patch-diff.githubusercontent.com/login?return_to=%2Froach-php%2Froach-php.dev
Code https://patch-diff.githubusercontent.com/roach-php/roach-php.dev
Issues 1 https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues
Pull requests 0 https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/pulls
Actions https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/actions
Security 0 https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/security
Insights https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/pulse
Code https://patch-diff.githubusercontent.com/roach-php/roach-php.dev
Issues https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues
Pull requests https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/pulls
Actions https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/actions
Security https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/security
Insights https://patch-diff.githubusercontent.com/roach-php/roach-php.dev/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/roach-php/roach-php.dev/issues/13
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/roach-php/roach-php.dev/issues/13
Inconsistency in middleware docshttps://patch-diff.githubusercontent.com/roach-php/roach-php.dev/issues/13#top
https://github.com/pedzed
https://github.com/pedzed
pedzedhttps://github.com/pedzed
on May 25, 2023https://github.com/roach-php/roach-php.dev/issues/13#issue-1725217032
roach-php/corehttps://github.com/roach-php/core
https://roach-php.dev/docs/downloader-middlewarehttps://roach-php.dev/docs/downloader-middleware
spider request middlewarehttps://roach-php.dev/docs/spider-middleware#request-middleware
initial requestshttps://roach-php.dev/docs/spiders#generating-the-initial-requests
spider response middlewarehttps://roach-php.dev/docs/spider-middleware#response-middleware
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.