diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c10ea6e..3efe43b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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] @@ -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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index faba229..203b4b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/LazyJson.php b/src/LazyJson.php index 61c34b9..99b62e0 100644 --- a/src/LazyJson.php +++ b/src/LazyJson.php @@ -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)); } /** @@ -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)); } /**