gordalina/cachetool

Replace file_get_contents() with symfony/http-client

Closed this issue · 1 comments

Hey Samuel,

Great work, I really enjoy this tool!

As it is already using Symfony components, I was wondering if you would be okay with replacing FileGetContents by the Symfony HttpClient. We'd have numerous advantages:

  • Proper exception handling
  • Support for cURL with auto-fallback to fopen/file_get_contents
  • Loads of quirks dealt with for us
  • etc.

Just checking before I create a PR :)

I'd happily accept a PR with a new SymfonyHttpClient adapter. You'd have more control on how to have the adapter configured as well.
Changing the current FileGetContents adapter could lead to breaking changes for current users. 👍