zend-diactoros v1.8.0 Release Notes
Release Date: 2018-06-27 // almost 6 years ago-
โ Added
- #307 adds the following functions under the
Zend\Diactoros
namespace, each of which may be used to derive artifacts from SAPI supergloabls for the purposes of generating aServerRequest
instance:normalizeServer(array $server, callable $apacheRequestHeaderCallback = null) : array
(main purpose is to aggregate theAuthorization
header in the SAPI params when under Apache)marshalProtocolVersionFromSapi(array $server) : string
marshalMethodFromSapi(array $server) : string
marshalUriFromSapi(array $server, array $headers) : Uri
marshalHeadersFromSapi(array $server) : array
parseCookieHeader(string $header) : array
createUploadedFile(array $spec) : UploadedFile
(creates the instance from a normal$_FILES
entry)normalizeUploadedFiles(array $files) : UploadedFileInterface[]
(traverses a potentially nested array of uploaded file instances and/or$_FILES
entries, including those aggregated under mod_php, php-fpm, and php-cgi in order to create a flat array ofUploadedFileInterface
instances to use in a request)
๐ Changed
- Nothing.
๐ Deprecated
๐ #307 deprecates
ServerRequestFactory::normalizeServer()
; the method is no longer used internally, and users should instead useZend\Diactoros\normalizeServer()
, to which it proxies.๐ #307 deprecates
ServerRequestFactory::marshalHeaders()
; the method is no longer used internally, and users should instead useZend\Diactoros\marshalHeadersFromSapi()
, to which it proxies.๐ #307 deprecates
ServerRequestFactory::marshalUriFromServer()
; the method is no longer used internally. Users should usemarshalUriFromSapi()
instead.๐ #307 deprecates
ServerRequestFactory::marshalRequestUri()
. the method is no longer used internally, and currently proxies tomarshalUriFromSapi()
, pulling the discovered path from theUri
instance returned by that function. Users should usemarshalUriFromSapi()
instead.๐ #307 deprecates
ServerRequestFactory::marshalHostAndPortFromHeaders()
; the method is no longer used internally, and currently proxies tomarshalUriFromSapi()
, pulling the discovered host and port from theUri
instance returned by that function. Users should usemarshalUriFromSapi()
instead.๐ #307 deprecates
ServerRequestFactory::getHeader()
; the method is no longer used internally. Users should copy and paste the functionality into their own applications if needed, or rely on headers from a fully-populatedUri
instance instead.๐ #307 deprecates
ServerRequestFactory::stripQueryString()
; the method is no longer used internally, and users can mimic the functionality via the expression$path = explode('?', $path, 2)[0];
.๐ #307 deprecates
ServerRequestFactory::normalizeFiles()
; the functionality is no longer used internally, and users can usenormalizeUploadedFiles()
as a replacement.๐ #303 deprecates
Zend\Diactoros\Response\EmitterInterface
and its various implementations. These are now provided via the zendframework/zend-httphandlerrunner package as 1:1 substitutions.๐ #303 deprecates the
Zend\Diactoros\Server
class. Users are directed to theRequestHandlerRunner
class from the zendframework/zend-httphandlerrunner package as an alternative.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
- #307 adds the following functions under the