alleyinteractive / stage-file-proxy

Mirror (or header to) uploaded files from a remote production site on your local development copy. Saves the trouble of downloading a giant uploads directory without sacrificing the images that accompany content.
24 stars 6 forks source link

Refresh docs and formatting #17

Open dlh01 opened 1 year ago

dlh01 commented 1 year ago

This PR picks up on the great work that @theMikeD started with in #13. Apart from some edits to those changes, this PR includes a couple of my own updates:

  1. Switch the version to a year, which still achieves the purpose of #7 but with at least a bit of semantic value.
  2. Removes the lorempixel mode, since the service appears to be dead.
theMikeD commented 1 year ago

Nice to see this is still alive :)

Not sure I follow the logic behind removing the parameter type hinting though. One step at a time I guess :)

dlh01 commented 1 year ago

Not sure I follow the logic behind removing the parameter type hinting though. One step at a time I guess :)

Sorry about that! Stated another way: I mean that if the type hints are added, I think a corresponding effort should be made to ensure that the correct types are actually being passed and returned within the SFP functions. For example, I would expect the return value here to be cast to (string): https://github.com/theMikeD/stage-file-proxy/blob/307ea4d8e56a1765832d44eb81bb6b1a22364a70/stage-file-proxy.php#L353. Without those checks for correctness, adding the type hints just increases the risk of fatal errors occurring where they currently don't, and that seems unexpected in a PR about "docs and formatting."

theMikeD commented 1 year ago

Ah, yes I understand the reasoning now. Good point, I concur.