From 7b3cb16405bc567f9b83a5123a6b0579f739fce3 Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Wed, 29 Nov 2023 19:00:41 +1000 Subject: [PATCH 1/5] Update workflow --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c10ea6e..96260cd 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.1 tools: composer:v2 coverage: none From 83cb7ccc621c23d7c8eebc6408482454a772e00a Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Wed, 29 Nov 2023 19:14:57 +1000 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 From 5851c8f288d990129e3f6fcc7265e63d8a2be60c Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Wed, 29 Nov 2023 19:19:18 +1000 Subject: [PATCH 3/5] Update build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96260cd..0fe6dd4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 From 166e0b24ccf1dbe7b5b5a61e358053114ed64080 Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Wed, 29 Nov 2023 19:25:02 +1000 Subject: [PATCH 4/5] Update build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fe6dd4..3efe43b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 tools: composer:v2 coverage: none From 82a2b4f6e482229cb0ce23b692f6eae48b4b32f6 Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Wed, 29 Nov 2023 20:08:23 +1000 Subject: [PATCH 5/5] Fix style --- src/LazyJson.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } /**