Skip to content
Snippets Groups Projects
Commit 1bba63bf authored by David Prévot's avatar David Prévot
Browse files

New upstream version 1.1.0

parents 7179fb92 4d8778e1
No related branches found
No related tags found
No related merge requests found
# Change Log # Change Log
## 1.1.0 - 2023-04-14
### Changed
- Allow `psr/http-message` v2 in addition to v1
- Deprecate all interfaces in favor of [PSR-17](https://www.php-fig.org/psr/psr-17/)
## 1.0.2 - 2015-12-19 ## 1.0.2 - 2015-12-19
### Added ### Added
......
Please see http://docs.php-http.org/en/latest/development/contributing.html
Copyright (c) 2015 PHP HTTP Team <team@php-http.org> Copyright (c) 2015-2016 PHP HTTP Team <team@php-http.org>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
**Factory interfaces for PSR-7 HTTP Message.** **Factory interfaces for PSR-7 HTTP Message.**
## Obsolete
The PHP-HTTP factories have become obsolete with the [PSR-17](https://www.php-fig.org/psr/psr-17/) factories standard.
All major HTTP client implementors provide [PSR-17 factories](https://packagist.org/packages/psr/http-factory).
This package will remain available for the time being to not break legacy code, but we encourage everybody to move to PSR-17.
## Install ## Install
...@@ -18,12 +24,12 @@ $ composer require php-http/message-factory ...@@ -18,12 +24,12 @@ $ composer require php-http/message-factory
## Documentation ## Documentation
Please see the [official documentation](http://php-http.readthedocs.org/en/latest/message-factory/). Please see the [official documentation](http://docs.php-http.org/en/latest/message/message-factory.html).
## Contributing ## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details. Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html).
## Security ## Security
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
], ],
"require": { "require": {
"php": ">=5.4", "php": ">=5.4",
"psr/http-message": "^1.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0-dev" "dev-master": "1.x-dev"
} }
} }
} }
{ {
"version": "1.0", "version": "1.0",
"name": "php-http/message-factory",
"binding-types": { "binding-types": {
"Http\\Message\\MessageFactory": { "Http\\Message\\MessageFactory": {
"description": "PSR-7 Message Factory", "description": "PSR-7 Message Factory",
......
...@@ -6,6 +6,8 @@ namespace Http\Message; ...@@ -6,6 +6,8 @@ namespace Http\Message;
* Factory for PSR-7 Request and Response. * Factory for PSR-7 Request and Response.
* *
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com> * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface and Psr\Http\Message\ResponseFactoryInterface instead.
*/ */
interface MessageFactory extends RequestFactory, ResponseFactory interface MessageFactory extends RequestFactory, ResponseFactory
{ {
......
...@@ -10,6 +10,8 @@ use Psr\Http\Message\StreamInterface; ...@@ -10,6 +10,8 @@ use Psr\Http\Message\StreamInterface;
* Factory for PSR-7 Request. * Factory for PSR-7 Request.
* *
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com> * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface instead.
*/ */
interface RequestFactory interface RequestFactory
{ {
......
...@@ -11,6 +11,8 @@ use Psr\Http\Message\StreamInterface; ...@@ -11,6 +11,8 @@ use Psr\Http\Message\StreamInterface;
* This factory contract can be reused in Message and Server Message factories. * This factory contract can be reused in Message and Server Message factories.
* *
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com> * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @deprecated since version 1.1, use Psr\Http\Message\ResponseFactoryInterface instead.
*/ */
interface ResponseFactory interface ResponseFactory
{ {
......
...@@ -8,6 +8,8 @@ use Psr\Http\Message\StreamInterface; ...@@ -8,6 +8,8 @@ use Psr\Http\Message\StreamInterface;
* Factory for PSR-7 Stream. * Factory for PSR-7 Stream.
* *
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com> * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @deprecated since version 1.1, use Psr\Http\Message\StreamFactoryInterface instead.
*/ */
interface StreamFactory interface StreamFactory
{ {
...@@ -18,8 +20,8 @@ interface StreamFactory ...@@ -18,8 +20,8 @@ interface StreamFactory
* *
* @return StreamInterface * @return StreamInterface
* *
* @throws \InvalidArgumentException If the stream body is invalid. * @throws \InvalidArgumentException if the stream body is invalid
* @throws \RuntimeException If creating the stream from $body fails. * @throws \RuntimeException if creating the stream from $body fails
*/ */
public function createStream($body = null); public function createStream($body = null);
} }
...@@ -8,6 +8,8 @@ use Psr\Http\Message\UriInterface; ...@@ -8,6 +8,8 @@ use Psr\Http\Message\UriInterface;
* Factory for PSR-7 URI. * Factory for PSR-7 URI.
* *
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com> * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @deprecated since version 1.1, use Psr\Http\Message\UriFactoryInterface instead.
*/ */
interface UriFactory interface UriFactory
{ {
...@@ -18,7 +20,7 @@ interface UriFactory ...@@ -18,7 +20,7 @@ interface UriFactory
* *
* @return UriInterface * @return UriInterface
* *
* @throws \InvalidArgumentException If the $uri argument can not be converted into a valid URI. * @throws \InvalidArgumentException if the $uri argument can not be converted into a valid URI
*/ */
public function createUri($uri); public function createUri($uri);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment