Skip to content

Commit

Permalink
Merge branch 'release/2.0.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cerbero90 committed Nov 29, 2023
2 parents 63d402a + 82a2b4f commit d70fca8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
php: [8.1, 8.2, 8.3]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]

Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: 8.2
tools: composer:v2
coverage: none

Expand All @@ -84,4 +84,4 @@ jobs:
composer update --prefer-stable --prefer-dist --no-interaction
- name: Execute Duster
run: vendor/bin/duster lint -u tlint,phpcodesniffer,pint,phpstan
run: vendor/bin/duster lint -u tlint,phpcodesniffer,pint,phpstan -vvv
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
- Nothing


## 2.0.0 - 2023-11-29

### Added
- Recursive lazy collections for JSON objects and arrays
- Auto-registering macro for lazy collections
- Dependency from [🧩 JSON Parser](https://github.com/cerbero90/json-parser)
- Namespaced helper
- Compatibility with latest versions of PHP
- Pest testing framework
- Tools for static analysis

### Removed
- Dependency from [JSON Machine](https://github.com/halaxa/json-machine)
- Compatibility with older versions of PHP


## 1.1.0 - 2021-05-06

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/LazyJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class LazyJson implements IteratorAggregate
*/
public static function from(mixed $source, string|array $dot = '*'): LazyCollection
{
return new LazyCollection(fn () => yield from new self($source, (array) $dot));
return new LazyCollection(fn() => yield from new self($source, (array) $dot));
}

/**
Expand All @@ -36,7 +36,7 @@ private function __construct(mixed $source, array $dots)
{
$this->parser = JsonParser::parse($source)
->lazyPointers(DotsConverter::toPointers($dots))
->wrap(fn (Parser $parser) => new LazyCollection(fn () => yield from $parser));
->wrap(fn(Parser $parser) => new LazyCollection(fn() => yield from $parser));
}

/**
Expand Down

0 comments on commit d70fca8

Please sign in to comment.