Skip to content

Instantly share code, notes, and snippets.

@weierophinney
Created May 4, 2015 21:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weierophinney/59681f2b52169d4b12e6 to your computer and use it in GitHub Desktop.
Save weierophinney/59681f2b52169d4b12e6 to your computer and use it in GitHub Desktop.
Summary of PSR-7 changes since Review 2 began.

Summary of changes since Review 2 Started

  • Expanded section on expected structure returned by getUploadedFiles(), with several examples ranging from a flat structure to a nested structure with a collection of files.
  • Clarifications and simplification of URI -> Host header interactions.
    • Updated withUri() to indicate it MUST update the Host header with the value present in the URI provided (if any) UNLESS the $preserveHost flag is boolean true.
    • Removed getHeader*() method overrides in RequestInterface, as they were no longer relevant with the above changes.
  • MessageInterface::getHeaderLine()'s signature was altered to always return a string (the string will be empty if the value is not defined). This removes ambiguity in the return value.
  • ResponseInterface::getReasonPhrase()'s signature was altered to always return a string (the string will be empty if the value is not defined). This removes ambiguity in the return value.
  • ResponseInterface::withStatus()'s signature was altered to provide an empty string as the default value of the $reasonPhrase argument.
  • UriInterface::withPath() clarifies that both relative and domain-relative paths (prefixed with /) may be set.
  • UploadedFileInterface::move($path) was renamed to moveTo($targetPath) to clarify intent; additionally, $targetPath was clarified as being an absolute path or a relative path, with resolution following PHP's rules when rename() is called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment