},
{
"name": "guzzlehttp/psr7",
- "version": "2.4.3",
+ "version": "2.4.4",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "67c26b443f348a51926030c83481b85718457d3d"
+ "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d",
- "reference": "67c26b443f348a51926030c83481b85718457d3d",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
+ "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.4.3"
+ "source": "https://github.com/guzzle/psr7/tree/2.4.4"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2022-10-26T14:07:24+00:00"
+ "time": "2023-03-09T13:19:02+00:00"
},
{
"name": "laminas/laminas-diactoros",
},
{
"name": "guzzlehttp/psr7",
- "version": "2.4.3",
- "version_normalized": "2.4.3.0",
+ "version": "2.4.4",
+ "version_normalized": "2.4.4.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "67c26b443f348a51926030c83481b85718457d3d"
+ "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d",
- "reference": "67c26b443f348a51926030c83481b85718457d3d",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
+ "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
"shasum": ""
},
"require": {
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
- "time": "2022-10-26T14:07:24+00:00",
+ "time": "2023-03-09T13:19:02+00:00",
"type": "library",
"extra": {
"bamarni-bin": {
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.4.3"
+ "source": "https://github.com/guzzle/psr7/tree/2.4.4"
},
"funding": [
{
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
- 'pretty_version' => '2.4.3',
- 'version' => '2.4.3.0',
- 'reference' => '67c26b443f348a51926030c83481b85718457d3d',
+ 'pretty_version' => '2.4.4',
+ 'version' => '2.4.4.0',
+ 'reference' => '3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
## Unreleased
+## 2.4.4 - 2023-03-09
+
+### Changed
+
+- Removed the need for `AllowDynamicProperties` in `LazyOpenStream`
+
## 2.4.3 - 2022-10-26
### Changed
![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg)
+# Installation
+
+```shell
+composer require guzzlehttp/psr7
+```
+
# Stream implementation
This package comes with a number of stream implementations and stream
private $callback;
+ private $stream;
+
public function __construct(StreamInterface $stream, callable $cb)
{
$this->stream = $stream;
* Lazily reads or writes to a file that is opened only after an IO operation
* take place on the stream.
*/
-#[\AllowDynamicProperties]
final class LazyOpenStream implements StreamInterface
{
use StreamDecoratorTrait;
/** @var string */
private $mode;
+ /**
+ * @var StreamInterface
+ */
+ private $stream;
+
/**
* @param string $filename File to lazily open
* @param string $mode fopen mode to use when opening the stream
{
$this->filename = $filename;
$this->mode = $mode;
+
+ // unsetting the property forces the first access to go through
+ // __get().
+ unset($this->stream);
}
/**