Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,72 @@
# 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

View File

@@ -0,0 +1 @@
Please see http://docs.php-http.org/en/latest/development/contributing.html

19
vendor/php-http/message-factory/LICENSE vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2015-2016 PHP HTTP Team <team@php-http.org>
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.

View File

@@ -0,0 +1,42 @@
# 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.

View File

@@ -0,0 +1,27 @@
{
"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"
}
}
}

View File

@@ -0,0 +1,44 @@
{
"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"
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
<?php
namespace Http\Message;
/**
* Factory for PSR-7 Request and Response.
*
* @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
{
}

View File

@@ -0,0 +1,36 @@
<?php
namespace Http\Message;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\StreamInterface;
/**
* Factory for PSR-7 Request.
*
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @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'
);
}

View File

@@ -0,0 +1,37 @@
<?php
namespace Http\Message;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
/**
* Factory for PSR-7 Response.
*
* This factory contract can be reused in Message and Server Message factories.
*
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @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'
);
}

View File

@@ -0,0 +1,27 @@
<?php
namespace Http\Message;
use Psr\Http\Message\StreamInterface;
/**
* Factory for PSR-7 Stream.
*
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @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);
}

View File

@@ -0,0 +1,26 @@
<?php
namespace Http\Message;
use Psr\Http\Message\UriInterface;
/**
* Factory for PSR-7 URI.
*
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*
* @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);
}