Skip to content

SimplePie: Avoid requesting local files using HTTP\Client - #993

Merged
jtojnar merged 1 commit into
masterfrom
wip/jtojnar/local-req
Nov 2, 2026
Merged

jtojnar merged 1 commit into
masterfrom
wip/jtojnar/local-req

Conversation

@jtojnar

@jtojnar jtojnar commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

In preparation for removal of local file support from HTTP clients,
let’s add a separate readLocalFile helper method for fetching local files
and use that instead of HTTP\Client instance.

This will only be used for the initial fetch, which should be fine,
as local files do not support redirects.

The helper method was taken from Psr18Client.
It was enhanced with an extra comment explaining the try–catch,
and trimming taken from File.


Stack created with GitHub Stacks CLI • Give Feedback 💬

In preparation for removal of local file support from HTTP clients,
let’s add a separate `readLocalFile` helper method for fetching local files
and use that instead of `HTTP\Client` instance.

This will only be used for the initial fetch, which should be fine,
as local files do not support redirects.

The helper method was taken from `Psr18Client`.
It was enhanced with an extra comment explaining the `try`–`catch`,
and trimming taken from `File`.
@jtojnar
jtojnar force-pushed the wip/jtojnar/local-req branch from fada5c7 to afb0b19 Compare November 2, 2026 21:58
@jtojnar
jtojnar merged commit afb0b19 into master Nov 2, 2026
18 checks passed
@jtojnar
jtojnar deleted the wip/jtojnar/local-req branch November 2, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant