Skip to content

Commit

Permalink
Update changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MAXakaWIZARD committed May 6, 2020
1 parent 9f836b2 commit 2ae8dc4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
@@ -1,8 +1,12 @@
CHANGELOG
=========

## 1.7.0 (2020-05-06)
* Add chunking support
* Add PSR-7 Http Message interface support

## 1.6.1 (2019-11-15)
* Fix issue with nested arrays of objects
* Fix issue with nested arrays of objects

## 1.6.0 (2019-10-12)
* Add support for more input formats (documents flow)
Expand Down Expand Up @@ -49,4 +53,4 @@ CHANGELOG
* Add more examples to readme

## 0.1.0 (2015-04-29)
* Initial implementation
* Initial implementation
18 changes: 15 additions & 3 deletions README.md
Expand Up @@ -237,6 +237,9 @@ $parser->parseAsObjects($stream, 'processItem');

### Pass [PSR-7](https://www.php-fig.org/psr/psr-7/) MessageInterface as parser input:
```php
use Psr\Http\Message\MessageInterface;

/** @var MessageInterface $resource */
$resource = $httpClient->get('https://httpbin.org/get');

$parser = new \JsonCollectionParser\Parser();
Expand All @@ -245,6 +248,9 @@ $parser->parseAsObjects($resource, 'processItem');

### Pass [PSR-7](https://www.php-fig.org/psr/psr-7/) StreamInterface as parser input:
```php
use Psr\Http\Message\MessageInterface;

/** @var MessageInterface $resource */
$resource = $httpClient->get('https://httpbin.org/get');

$parser = new \JsonCollectionParser\Parser();
Expand All @@ -253,9 +259,15 @@ $parser->parseAsObjects($resource->getBody(), 'processItem');

## Supported formats

* [PSR-7](https://www.php-fig.org/psr/psr-7/) - HTTP message interface
* `.json` - raw JSON file
* `.gz` - GZIP-compressed file (you will need `zlib` PHP extension installed)
* `.json` - raw JSON
* `.gz` - GZIP-compressed JSON (you will need `zlib` PHP extension installed)

## Supported sources

* file
* string
* stream / resource
* HTTP message interface [PSR-7](https://www.php-fig.org/psr/psr-7/)

## Running tests
```bash
Expand Down
6 changes: 6 additions & 0 deletions src/Stream/DataStream.php
Expand Up @@ -44,6 +44,8 @@ public static function close($stream): ?bool
}

/**
* Handler for resource input type
*
* @param mixed $input
*
* @throws StreamException
Expand All @@ -60,6 +62,8 @@ protected static function resource($input)
}

/**
* Handler for string input type
*
* @param string $input
*
* @throws StreamException
Expand All @@ -82,6 +86,8 @@ protected static function string(string $input)
}

/**
* Handler for object input type
*
* @param MessageInterface|StreamInterface $object
*
* @throws StreamException
Expand Down

0 comments on commit 2ae8dc4

Please sign in to comment.