zend-diactoros 1.8.0
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.