composer update
This commit is contained in:
6
vendor/symfony/http-foundation/Cookie.php
vendored
6
vendor/symfony/http-foundation/Cookie.php
vendored
@@ -18,9 +18,9 @@ namespace Symfony\Component\HttpFoundation;
|
||||
*/
|
||||
class Cookie
|
||||
{
|
||||
const SAMESITE_NONE = 'none';
|
||||
const SAMESITE_LAX = 'lax';
|
||||
const SAMESITE_STRICT = 'strict';
|
||||
public const SAMESITE_NONE = 'none';
|
||||
public const SAMESITE_LAX = 'lax';
|
||||
public const SAMESITE_STRICT = 'strict';
|
||||
|
||||
protected $name;
|
||||
protected $value;
|
||||
|
||||
16
vendor/symfony/http-foundation/JsonResponse.php
vendored
16
vendor/symfony/http-foundation/JsonResponse.php
vendored
@@ -29,7 +29,7 @@ class JsonResponse extends Response
|
||||
|
||||
// Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML.
|
||||
// 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT
|
||||
const DEFAULT_ENCODING_OPTIONS = 15;
|
||||
public const DEFAULT_ENCODING_OPTIONS = 15;
|
||||
|
||||
protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS;
|
||||
|
||||
@@ -43,6 +43,10 @@ class JsonResponse extends Response
|
||||
{
|
||||
parent::__construct('', $status, $headers);
|
||||
|
||||
if ($json && !\is_string($data) && !is_numeric($data) && !\is_callable([$data, '__toString'])) {
|
||||
throw new \TypeError(sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data)));
|
||||
}
|
||||
|
||||
if (null === $data) {
|
||||
$data = new \ArrayObject();
|
||||
}
|
||||
@@ -77,13 +81,13 @@ class JsonResponse extends Response
|
||||
* return JsonResponse::fromJsonString('{"key": "value"}')
|
||||
* ->setSharedMaxAge(300);
|
||||
*
|
||||
* @param string|null $data The JSON response string
|
||||
* @param int $status The response status code
|
||||
* @param array $headers An array of response headers
|
||||
* @param string $data The JSON response string
|
||||
* @param int $status The response status code
|
||||
* @param array $headers An array of response headers
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function fromJsonString($data = null, $status = 200, $headers = [])
|
||||
public static function fromJsonString($data, $status = 200, $headers = [])
|
||||
{
|
||||
return new static($data, $status, $headers, true);
|
||||
}
|
||||
@@ -129,8 +133,6 @@ class JsonResponse extends Response
|
||||
* @param string $json
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function setJson($json)
|
||||
{
|
||||
|
||||
48
vendor/symfony/http-foundation/Request.php
vendored
48
vendor/symfony/http-foundation/Request.php
vendored
@@ -38,24 +38,24 @@ class_exists(ServerBag::class);
|
||||
*/
|
||||
class Request
|
||||
{
|
||||
const HEADER_FORWARDED = 0b00001; // When using RFC 7239
|
||||
const HEADER_X_FORWARDED_FOR = 0b00010;
|
||||
const HEADER_X_FORWARDED_HOST = 0b00100;
|
||||
const HEADER_X_FORWARDED_PROTO = 0b01000;
|
||||
const HEADER_X_FORWARDED_PORT = 0b10000;
|
||||
const HEADER_X_FORWARDED_ALL = 0b11110; // All "X-Forwarded-*" headers
|
||||
const HEADER_X_FORWARDED_AWS_ELB = 0b11010; // AWS ELB doesn't send X-Forwarded-Host
|
||||
public const HEADER_FORWARDED = 0b00001; // When using RFC 7239
|
||||
public const HEADER_X_FORWARDED_FOR = 0b00010;
|
||||
public const HEADER_X_FORWARDED_HOST = 0b00100;
|
||||
public const HEADER_X_FORWARDED_PROTO = 0b01000;
|
||||
public const HEADER_X_FORWARDED_PORT = 0b10000;
|
||||
public const HEADER_X_FORWARDED_ALL = 0b11110; // All "X-Forwarded-*" headers
|
||||
public const HEADER_X_FORWARDED_AWS_ELB = 0b11010; // AWS ELB doesn't send X-Forwarded-Host
|
||||
|
||||
const METHOD_HEAD = 'HEAD';
|
||||
const METHOD_GET = 'GET';
|
||||
const METHOD_POST = 'POST';
|
||||
const METHOD_PUT = 'PUT';
|
||||
const METHOD_PATCH = 'PATCH';
|
||||
const METHOD_DELETE = 'DELETE';
|
||||
const METHOD_PURGE = 'PURGE';
|
||||
const METHOD_OPTIONS = 'OPTIONS';
|
||||
const METHOD_TRACE = 'TRACE';
|
||||
const METHOD_CONNECT = 'CONNECT';
|
||||
public const METHOD_HEAD = 'HEAD';
|
||||
public const METHOD_GET = 'GET';
|
||||
public const METHOD_POST = 'POST';
|
||||
public const METHOD_PUT = 'PUT';
|
||||
public const METHOD_PATCH = 'PATCH';
|
||||
public const METHOD_DELETE = 'DELETE';
|
||||
public const METHOD_PURGE = 'PURGE';
|
||||
public const METHOD_OPTIONS = 'OPTIONS';
|
||||
public const METHOD_TRACE = 'TRACE';
|
||||
public const METHOD_CONNECT = 'CONNECT';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
@@ -504,15 +504,7 @@ class Request
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
try {
|
||||
$content = $this->getContent();
|
||||
} catch (\LogicException $e) {
|
||||
if (\PHP_VERSION_ID >= 70400) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return trigger_error($e, \E_USER_ERROR);
|
||||
}
|
||||
$content = $this->getContent();
|
||||
|
||||
$cookieHeader = '';
|
||||
$cookies = [];
|
||||
@@ -577,8 +569,6 @@ class Request
|
||||
*
|
||||
* @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR']
|
||||
* @param int $trustedHeaderSet A bit field of Request::HEADER_*, to set which headers to trust from your proxies
|
||||
*
|
||||
* @throws \InvalidArgumentException When $trustedHeaderSet is invalid
|
||||
*/
|
||||
public static function setTrustedProxies(array $proxies, int $trustedHeaderSet)
|
||||
{
|
||||
@@ -1527,8 +1517,6 @@ class Request
|
||||
* @param bool $asResource If true, a resource will be returned
|
||||
*
|
||||
* @return string|resource The request body content or a resource to read the body stream
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function getContent($asResource = false)
|
||||
{
|
||||
|
||||
128
vendor/symfony/http-foundation/Response.php
vendored
128
vendor/symfony/http-foundation/Response.php
vendored
@@ -21,74 +21,74 @@ class_exists(ResponseHeaderBag::class);
|
||||
*/
|
||||
class Response
|
||||
{
|
||||
const HTTP_CONTINUE = 100;
|
||||
const HTTP_SWITCHING_PROTOCOLS = 101;
|
||||
const HTTP_PROCESSING = 102; // RFC2518
|
||||
const HTTP_EARLY_HINTS = 103; // RFC8297
|
||||
const HTTP_OK = 200;
|
||||
const HTTP_CREATED = 201;
|
||||
const HTTP_ACCEPTED = 202;
|
||||
const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
|
||||
const HTTP_NO_CONTENT = 204;
|
||||
const HTTP_RESET_CONTENT = 205;
|
||||
const HTTP_PARTIAL_CONTENT = 206;
|
||||
const HTTP_MULTI_STATUS = 207; // RFC4918
|
||||
const HTTP_ALREADY_REPORTED = 208; // RFC5842
|
||||
const HTTP_IM_USED = 226; // RFC3229
|
||||
const HTTP_MULTIPLE_CHOICES = 300;
|
||||
const HTTP_MOVED_PERMANENTLY = 301;
|
||||
const HTTP_FOUND = 302;
|
||||
const HTTP_SEE_OTHER = 303;
|
||||
const HTTP_NOT_MODIFIED = 304;
|
||||
const HTTP_USE_PROXY = 305;
|
||||
const HTTP_RESERVED = 306;
|
||||
const HTTP_TEMPORARY_REDIRECT = 307;
|
||||
const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
|
||||
const HTTP_BAD_REQUEST = 400;
|
||||
const HTTP_UNAUTHORIZED = 401;
|
||||
const HTTP_PAYMENT_REQUIRED = 402;
|
||||
const HTTP_FORBIDDEN = 403;
|
||||
const HTTP_NOT_FOUND = 404;
|
||||
const HTTP_METHOD_NOT_ALLOWED = 405;
|
||||
const HTTP_NOT_ACCEPTABLE = 406;
|
||||
const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
|
||||
const HTTP_REQUEST_TIMEOUT = 408;
|
||||
const HTTP_CONFLICT = 409;
|
||||
const HTTP_GONE = 410;
|
||||
const HTTP_LENGTH_REQUIRED = 411;
|
||||
const HTTP_PRECONDITION_FAILED = 412;
|
||||
const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
|
||||
const HTTP_REQUEST_URI_TOO_LONG = 414;
|
||||
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
|
||||
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
|
||||
const HTTP_EXPECTATION_FAILED = 417;
|
||||
const HTTP_I_AM_A_TEAPOT = 418; // RFC2324
|
||||
const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540
|
||||
const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
|
||||
const HTTP_LOCKED = 423; // RFC4918
|
||||
const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
|
||||
public const HTTP_CONTINUE = 100;
|
||||
public const HTTP_SWITCHING_PROTOCOLS = 101;
|
||||
public const HTTP_PROCESSING = 102; // RFC2518
|
||||
public const HTTP_EARLY_HINTS = 103; // RFC8297
|
||||
public const HTTP_OK = 200;
|
||||
public const HTTP_CREATED = 201;
|
||||
public const HTTP_ACCEPTED = 202;
|
||||
public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
|
||||
public const HTTP_NO_CONTENT = 204;
|
||||
public const HTTP_RESET_CONTENT = 205;
|
||||
public const HTTP_PARTIAL_CONTENT = 206;
|
||||
public const HTTP_MULTI_STATUS = 207; // RFC4918
|
||||
public const HTTP_ALREADY_REPORTED = 208; // RFC5842
|
||||
public const HTTP_IM_USED = 226; // RFC3229
|
||||
public const HTTP_MULTIPLE_CHOICES = 300;
|
||||
public const HTTP_MOVED_PERMANENTLY = 301;
|
||||
public const HTTP_FOUND = 302;
|
||||
public const HTTP_SEE_OTHER = 303;
|
||||
public const HTTP_NOT_MODIFIED = 304;
|
||||
public const HTTP_USE_PROXY = 305;
|
||||
public const HTTP_RESERVED = 306;
|
||||
public const HTTP_TEMPORARY_REDIRECT = 307;
|
||||
public const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
|
||||
public const HTTP_BAD_REQUEST = 400;
|
||||
public const HTTP_UNAUTHORIZED = 401;
|
||||
public const HTTP_PAYMENT_REQUIRED = 402;
|
||||
public const HTTP_FORBIDDEN = 403;
|
||||
public const HTTP_NOT_FOUND = 404;
|
||||
public const HTTP_METHOD_NOT_ALLOWED = 405;
|
||||
public const HTTP_NOT_ACCEPTABLE = 406;
|
||||
public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
|
||||
public const HTTP_REQUEST_TIMEOUT = 408;
|
||||
public const HTTP_CONFLICT = 409;
|
||||
public const HTTP_GONE = 410;
|
||||
public const HTTP_LENGTH_REQUIRED = 411;
|
||||
public const HTTP_PRECONDITION_FAILED = 412;
|
||||
public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
|
||||
public const HTTP_REQUEST_URI_TOO_LONG = 414;
|
||||
public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
|
||||
public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
|
||||
public const HTTP_EXPECTATION_FAILED = 417;
|
||||
public const HTTP_I_AM_A_TEAPOT = 418; // RFC2324
|
||||
public const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540
|
||||
public const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
|
||||
public const HTTP_LOCKED = 423; // RFC4918
|
||||
public const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817
|
||||
const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04
|
||||
const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
|
||||
const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
|
||||
const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
|
||||
const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585
|
||||
const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
|
||||
const HTTP_INTERNAL_SERVER_ERROR = 500;
|
||||
const HTTP_NOT_IMPLEMENTED = 501;
|
||||
const HTTP_BAD_GATEWAY = 502;
|
||||
const HTTP_SERVICE_UNAVAILABLE = 503;
|
||||
const HTTP_GATEWAY_TIMEOUT = 504;
|
||||
const HTTP_VERSION_NOT_SUPPORTED = 505;
|
||||
const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295
|
||||
const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918
|
||||
const HTTP_LOOP_DETECTED = 508; // RFC5842
|
||||
const HTTP_NOT_EXTENDED = 510; // RFC2774
|
||||
const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585
|
||||
public const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817
|
||||
public const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04
|
||||
public const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
|
||||
public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
|
||||
public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
|
||||
public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585
|
||||
public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
|
||||
public const HTTP_INTERNAL_SERVER_ERROR = 500;
|
||||
public const HTTP_NOT_IMPLEMENTED = 501;
|
||||
public const HTTP_BAD_GATEWAY = 502;
|
||||
public const HTTP_SERVICE_UNAVAILABLE = 503;
|
||||
public const HTTP_GATEWAY_TIMEOUT = 504;
|
||||
public const HTTP_VERSION_NOT_SUPPORTED = 505;
|
||||
public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295
|
||||
public const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918
|
||||
public const HTTP_LOOP_DETECTED = 508; // RFC5842
|
||||
public const HTTP_NOT_EXTENDED = 510; // RFC2774
|
||||
public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585
|
||||
|
||||
/**
|
||||
* @var ResponseHeaderBag
|
||||
|
||||
@@ -18,11 +18,11 @@ namespace Symfony\Component\HttpFoundation;
|
||||
*/
|
||||
class ResponseHeaderBag extends HeaderBag
|
||||
{
|
||||
const COOKIES_FLAT = 'flat';
|
||||
const COOKIES_ARRAY = 'array';
|
||||
public const COOKIES_FLAT = 'flat';
|
||||
public const COOKIES_ARRAY = 'array';
|
||||
|
||||
const DISPOSITION_ATTACHMENT = 'attachment';
|
||||
const DISPOSITION_INLINE = 'inline';
|
||||
public const DISPOSITION_ATTACHMENT = 'attachment';
|
||||
public const DISPOSITION_INLINE = 'inline';
|
||||
|
||||
protected $computedCacheControl = [];
|
||||
protected $cookies = [];
|
||||
|
||||
@@ -46,7 +46,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
||||
* write will win in this case. It might be useful when you implement your own
|
||||
* logic to deal with this like an optimistic approach.
|
||||
*/
|
||||
const LOCK_NONE = 0;
|
||||
public const LOCK_NONE = 0;
|
||||
|
||||
/**
|
||||
* Creates an application-level lock on a session. The disadvantage is that the
|
||||
@@ -55,7 +55,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
||||
* does not require a transaction.
|
||||
* This mode is not available for SQLite and not yet implemented for oci and sqlsrv.
|
||||
*/
|
||||
const LOCK_ADVISORY = 1;
|
||||
public const LOCK_ADVISORY = 1;
|
||||
|
||||
/**
|
||||
* Issues a real row lock. Since it uses a transaction between opening and
|
||||
@@ -63,7 +63,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
||||
* that you also use for your application logic. This mode is the default because
|
||||
* it's the only reliable solution across DBMSs.
|
||||
*/
|
||||
const LOCK_TRANSACTIONAL = 2;
|
||||
public const LOCK_TRANSACTIONAL = 2;
|
||||
|
||||
private const MAX_LIFETIME = 315576000;
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
|
||||
*/
|
||||
class MetadataBag implements SessionBagInterface
|
||||
{
|
||||
const CREATED = 'c';
|
||||
const UPDATED = 'u';
|
||||
const LIFETIME = 'l';
|
||||
public const CREATED = 'c';
|
||||
public const UPDATED = 'u';
|
||||
public const LIFETIME = 'l';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
||||
3
vendor/symfony/http-foundation/composer.json
vendored
3
vendor/symfony/http-foundation/composer.json
vendored
@@ -18,7 +18,8 @@
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
"symfony/mime": "^4.3|^5.0",
|
||||
"symfony/polyfill-mbstring": "~1.1"
|
||||
"symfony/polyfill-mbstring": "~1.1",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
},
|
||||
"require-dev": {
|
||||
"predis/predis": "~1.0",
|
||||
|
||||
Reference in New Issue
Block a user