pax_global_header00006660000000000000000000000064144162600610014512gustar00rootroot0000000000000052 comment=4d8778e1c7d405cbb471574821c1ff5b68cc8f57 message-factory-1.1.0/000077500000000000000000000000001441626006100146025ustar00rootroot00000000000000message-factory-1.1.0/CHANGELOG.md000066400000000000000000000020541441626006100164140ustar00rootroot00000000000000# 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 ### Added - Request and Response factory binding types to Puli ## 1.0.1 - 2015-12-17 ### Added - Puli configuration and binding types ## 1.0.0 - 2015-12-15 ### Added - Response Factory in order to be reused in Message and Server Message factories - Request Factory ### Changed - Message Factory extends Request and Response factories ## 1.0.0-RC1 - 2015-12-14 ### Added - CS check ### Changed - RuntimeException is thrown when the StreamFactory cannot write to the underlying stream ## 0.3.0 - 2015-11-16 ### Removed - Client Context Factory - Factory Awares and Templates ## 0.2.0 - 2015-11-16 ### Changed - Reordered the parameters when creating a message to have the protocol last, as its the least likely to need to be changed. ## 0.1.0 - 2015-06-01 ### Added - Initial release ### Changed - Helpers are renamed to templates message-factory-1.1.0/CONTRIBUTING000066400000000000000000000001141441626006100164300ustar00rootroot00000000000000Please see http://docs.php-http.org/en/latest/development/contributing.html message-factory-1.1.0/LICENSE000066400000000000000000000020721441626006100156100ustar00rootroot00000000000000Copyright (c) 2015-2016 PHP HTTP Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. message-factory-1.1.0/README.md000066400000000000000000000026341441626006100160660ustar00rootroot00000000000000# PSR-7 Message Factory [![Latest Version](https://img.shields.io/github/release/php-http/message-factory.svg?style=flat-square)](https://github.com/php-http/message-factory/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) [![Total Downloads](https://img.shields.io/packagist/dt/php-http/message-factory.svg?style=flat-square)](https://packagist.org/packages/php-http/message-factory) **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 Via Composer ``` bash $ composer require php-http/message-factory ``` ## Documentation Please see the [official documentation](http://docs.php-http.org/en/latest/message/message-factory.html). ## Contributing Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). ## Security If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). ## License The MIT License (MIT). Please see [License File](LICENSE) for more information. message-factory-1.1.0/composer.json000066400000000000000000000012041441626006100173210ustar00rootroot00000000000000{ "name": "php-http/message-factory", "description": "Factory interfaces for PSR-7 HTTP Message", "license": "MIT", "keywords": ["http", "factory", "message", "stream", "uri"], "homepage": "http://php-http.org", "authors": [ { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com" } ], "require": { "php": ">=5.4", "psr/http-message": "^1.0 || ^2.0" }, "autoload": { "psr-4": { "Http\\Message\\": "src/" } }, "extra": { "branch-alias": { "dev-master": "1.x-dev" } } } message-factory-1.1.0/puli.json000066400000000000000000000026411441626006100164510ustar00rootroot00000000000000{ "version": "1.0", "name": "php-http/message-factory", "binding-types": { "Http\\Message\\MessageFactory": { "description": "PSR-7 Message Factory", "parameters": { "depends": { "description": "Optional class dependency which can be checked by consumers" } } }, "Http\\Message\\RequestFactory": { "parameters": { "depends": { "description": "Optional class dependency which can be checked by consumers" } } }, "Http\\Message\\ResponseFactory": { "parameters": { "depends": { "description": "Optional class dependency which can be checked by consumers" } } }, "Http\\Message\\StreamFactory": { "description": "PSR-7 Stream Factory", "parameters": { "depends": { "description": "Optional class dependency which can be checked by consumers" } } }, "Http\\Message\\UriFactory": { "description": "PSR-7 URI Factory", "parameters": { "depends": { "description": "Optional class dependency which can be checked by consumers" } } } } } message-factory-1.1.0/src/000077500000000000000000000000001441626006100153715ustar00rootroot00000000000000message-factory-1.1.0/src/MessageFactory.php000066400000000000000000000005351441626006100210210ustar00rootroot00000000000000 * * @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface and Psr\Http\Message\ResponseFactoryInterface instead. */ interface MessageFactory extends RequestFactory, ResponseFactory { } message-factory-1.1.0/src/RequestFactory.php000066400000000000000000000016261441626006100210670ustar00rootroot00000000000000 * * @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface instead. */ interface RequestFactory { /** * Creates a new PSR-7 request. * * @param string $method * @param string|UriInterface $uri * @param array $headers * @param resource|string|StreamInterface|null $body * @param string $protocolVersion * * @return RequestInterface */ public function createRequest( $method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1' ); } message-factory-1.1.0/src/ResponseFactory.php000066400000000000000000000017641441626006100212400ustar00rootroot00000000000000 * * @deprecated since version 1.1, use Psr\Http\Message\ResponseFactoryInterface instead. */ interface ResponseFactory { /** * Creates a new PSR-7 response. * * @param int $statusCode * @param string|null $reasonPhrase * @param array $headers * @param resource|string|StreamInterface|null $body * @param string $protocolVersion * * @return ResponseInterface */ public function createResponse( $statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $protocolVersion = '1.1' ); } message-factory-1.1.0/src/StreamFactory.php000066400000000000000000000012061441626006100206640ustar00rootroot00000000000000 * * @deprecated since version 1.1, use Psr\Http\Message\StreamFactoryInterface instead. */ interface StreamFactory { /** * Creates a new PSR-7 stream. * * @param string|resource|StreamInterface|null $body * * @return StreamInterface * * @throws \InvalidArgumentException if the stream body is invalid * @throws \RuntimeException if creating the stream from $body fails */ public function createStream($body = null); } message-factory-1.1.0/src/UriFactory.php000066400000000000000000000010401441626006100201640ustar00rootroot00000000000000 * * @deprecated since version 1.1, use Psr\Http\Message\UriFactoryInterface instead. */ interface UriFactory { /** * Creates an PSR-7 URI. * * @param string|UriInterface $uri * * @return UriInterface * * @throws \InvalidArgumentException if the $uri argument can not be converted into a valid URI */ public function createUri($uri); }