},
{
"name": "guzzlehttp/psr7",
- "version": "2.2.1",
+ "version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2"
+ "reference": "a119247127ff95789a2d95c347cd74721fbedaa4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2",
- "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/a119247127ff95789a2d95c347cd74721fbedaa4",
+ "reference": "a119247127ff95789a2d95c347cd74721fbedaa4",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.2.1"
+ "source": "https://github.com/guzzle/psr7/tree/2.2.2"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2022-03-20T21:55:58+00:00"
+ "time": "2022-06-08T19:55:23+00:00"
},
{
"name": "laminas/laminas-diactoros",
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.25.0",
+ "version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
+ "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
- "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
"shasum": ""
},
"require": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-11-30T18:21:41+00:00"
+ "time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.25.0",
+ "version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
- "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
"shasum": ""
},
"require": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-06-05T21:20:04+00:00"
+ "time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php74",
- "version": "v1.25.0",
+ "version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php74.git",
- "reference": "a5d80cdf049bd3b0af6da91184a2cd37533c0fd8"
+ "reference": "ad4f7d62a17b1187d9f381f0a662aab19ff3c033"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/a5d80cdf049bd3b0af6da91184a2cd37533c0fd8",
- "reference": "a5d80cdf049bd3b0af6da91184a2cd37533c0fd8",
+ "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/ad4f7d62a17b1187d9f381f0a662aab19ff3c033",
+ "reference": "ad4f7d62a17b1187d9f381f0a662aab19ff3c033",
"shasum": ""
},
"require": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php74/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-php74/tree/v1.26.0"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-02-19T12:13:01+00:00"
+ "time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.25.0",
+ "version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
- "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
"shasum": ""
},
"require": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2022-03-04T08:16:47+00:00"
+ "time": "2022-05-10T07:21:04+00:00"
},
{
"name": "true/punycode",
},
{
"name": "guzzlehttp/psr7",
- "version": "2.2.1",
- "version_normalized": "2.2.1.0",
+ "version": "2.2.2",
+ "version_normalized": "2.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2"
+ "reference": "a119247127ff95789a2d95c347cd74721fbedaa4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2",
- "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/a119247127ff95789a2d95c347cd74721fbedaa4",
+ "reference": "a119247127ff95789a2d95c347cd74721fbedaa4",
"shasum": ""
},
"require": {
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
- "time": "2022-03-20T21:55:58+00:00",
+ "time": "2022-06-08T19:55:23+00:00",
"type": "library",
"extra": {
"branch-alias": {
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.2.1"
+ "source": "https://github.com/guzzle/psr7/tree/2.2.2"
},
"funding": [
{
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.25.0",
- "version_normalized": "1.25.0.0",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
+ "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
- "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
"shasum": ""
},
"require": {
"suggest": {
"ext-mbstring": "For best performance"
},
- "time": "2021-11-30T18:21:41+00:00",
+ "time": "2022-05-24T11:49:31+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
},
"funding": [
{
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.25.0",
- "version_normalized": "1.25.0.0",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
- "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
- "time": "2021-06-05T21:20:04+00:00",
+ "time": "2022-05-24T11:49:31+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
},
"funding": [
{
},
{
"name": "symfony/polyfill-php74",
- "version": "v1.25.0",
- "version_normalized": "1.25.0.0",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php74.git",
- "reference": "a5d80cdf049bd3b0af6da91184a2cd37533c0fd8"
+ "reference": "ad4f7d62a17b1187d9f381f0a662aab19ff3c033"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/a5d80cdf049bd3b0af6da91184a2cd37533c0fd8",
- "reference": "a5d80cdf049bd3b0af6da91184a2cd37533c0fd8",
+ "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/ad4f7d62a17b1187d9f381f0a662aab19ff3c033",
+ "reference": "ad4f7d62a17b1187d9f381f0a662aab19ff3c033",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
- "time": "2021-02-19T12:13:01+00:00",
+ "time": "2022-05-24T11:49:31+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php74/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-php74/tree/v1.26.0"
},
"funding": [
{
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.25.0",
- "version_normalized": "1.25.0.0",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
- "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
- "time": "2022-03-04T08:16:47+00:00",
+ "time": "2022-05-10T07:21:04+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
},
"funding": [
{
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
- 'pretty_version' => '2.2.1',
- 'version' => '2.2.1.0',
+ 'pretty_version' => '2.2.2',
+ 'version' => '2.2.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
- 'reference' => 'c94a94f120803a18554c1805ef2e539f8285f9a2',
+ 'reference' => 'a119247127ff95789a2d95c347cd74721fbedaa4',
'dev_requirement' => false,
),
'laminas/laminas-diactoros' => array(
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
- 'pretty_version' => 'v1.25.0',
- 'version' => '1.25.0.0',
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
- 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
+ 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e',
'dev_requirement' => false,
),
'symfony/polyfill-php73' => array(
- 'pretty_version' => 'v1.25.0',
- 'version' => '1.25.0.0',
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(),
- 'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5',
+ 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85',
'dev_requirement' => false,
),
'symfony/polyfill-php74' => array(
- 'pretty_version' => 'v1.25.0',
- 'version' => '1.25.0.0',
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php74',
'aliases' => array(),
- 'reference' => 'a5d80cdf049bd3b0af6da91184a2cd37533c0fd8',
+ 'reference' => 'ad4f7d62a17b1187d9f381f0a662aab19ff3c033',
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
- 'pretty_version' => 'v1.25.0',
- 'version' => '1.25.0.0',
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(),
- 'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c',
+ 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace',
'dev_requirement' => false,
),
'true/punycode' => array(
## Unreleased
+## 2.2.2 - 2022-06-08
+
+### Fixed
+
+- Fix `Message::parseRequestUri()` for numeric headers
+- Re-wrap exceptions thrown in `fread` into runtime exceptions
+- Throw an exception when multipart options is misformatted
+
## 2.2.1 - 2022-03-20
### Fixed
This of course assumes they will be resolved against the same base URI. If this is not the case, determination of
equivalence or difference of relative references does not mean anything.
+## Version Guidance
+
+| Version | Status | PHP Version |
+|---------|----------------|------------------|
+| 1.x | Security fixes | >= 5.4, < 8.2 |
+| 2.x | Latest | ^7.2.5 \|\| ^8.0 |
## Security
"bamarni/composer-bin-plugin": true
},
"preferred-install": "dist",
- "sort-packages": true,
- "allow-plugins": {
- "bamarni/composer-bin-plugin": true
- }
+ "sort-packages": true
}
}
public static function parseRequestUri(string $path, array $headers): string
{
$hostKey = array_filter(array_keys($headers), function ($k) {
+ // Numeric array keys are converted to int by PHP.
+ $k = (string) $k;
+
return strtolower($k) === 'host';
});
{
$this->headerNames = $this->headers = [];
foreach ($headers as $header => $value) {
- if (is_int($header)) {
- // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
- // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
- $header = (string) $header;
- }
+ // Numeric array keys are converted to int by PHP.
+ $header = (string) $header;
+
$this->assertHeader($header);
$value = $this->normalizeHeaderValue($value);
$normalized = strtolower($header);
$stream = new AppendStream();
foreach ($elements as $element) {
+ if (!is_array($element)) {
+ throw new \UnexpectedValueException("An array is expected");
+ }
$this->addElement($stream, $element);
}
return '';
}
- $string = fread($this->stream, $length);
+ try {
+ $string = fread($this->stream, $length);
+ } catch (\Exception $e) {
+ throw new \RuntimeException('Unable to read from stream', 0, $e);
+ }
+
if (false === $string) {
throw new \RuntimeException('Unable to read from stream');
}
}
$rx .= '.{'.$split_length.'})/us';
- return preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
+ return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
}
$result = [];
[Mbstring](https://php.net/mbstring) extension.
More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
- [`JsonException`](https://php.net/JsonException)
More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
}
if ('UTF-8' === $encoding || \in_array(strtoupper($encoding), ['UTF-8', 'UTF8'], true)) {
- return preg_split("/(.{{$split_length}})/u", $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
+ return preg_split("/(.{{$split_length}})/u", $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
}
$result = [];
- [`password_algos`](https://php.net/password_algos)
More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
This component provides features added to PHP 8.0 core:
-- `Stringable` interface
+- [`Stringable`](https://php.net/stringable) interface
- [`fdiv`](https://php.net/fdiv)
-- `ValueError` class
-- `UnhandledMatchError` class
+- [`ValueError`](https://php.net/valueerror) class
+- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class
- `FILTER_VALIDATE_BOOL` constant
- [`get_debug_type`](https://php.net/get_debug_type)
+- [`PhpToken`](https://php.net/phptoken) class
- [`preg_last_error_msg`](https://php.net/preg_last_error_msg)
- [`str_contains`](https://php.net/str_contains)
- [`str_starts_with`](https://php.net/str_starts_with)
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.23-dev"
+ "dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",