Skip to content

# PHP AnyDataset JSON 6.0 - #8

Merged
byjg merged 13 commits into
masterfrom
6.0
Nov 24, 2025
Merged

# PHP AnyDataset JSON 6.0#8
byjg merged 13 commits into
masterfrom
6.0

Conversation

@byjg

@byjg byjg commented Mar 23, 2025

Copy link
Copy Markdown
Owner

Major Changes

This version brings significant updates to support PHP 8.4 and makes important API changes to align with modern PHP standards and improve code quality.

Added

  • Added support for PHP 8.4
  • Added #[Override] attribute for interface implementations
  • Improved type declarations throughout the codebase
  • Enhanced documentation with more examples and better explanations

Changed

  • Updated dependency byjg/anydataset from ^5.1 to ^6.0
  • Updated PHPUnit from ^9.6 to ^10.5|^11.5
  • Updated Psalm from ^5.6 to ^6.0
  • Modernized PHPUnit XML configuration format

Breaking Changes

Previous API New API Notes
$iterator->hasNext() $iterator->valid() Use standard Iterator interface method
$iterator->moveNext() $iterator->current() and $iterator->next() Split into two standard Iterator interface methods
JsonFieldDefinition::isRequired() JsonFieldDefinition::required() Method renamed for better readability
JsonFieldDefinition::ofAnyType() JsonFieldDefinition::ofTypeAny() Method renamed for consistency with other type methods

Migration Guide

Iterator Usage

Before:

while ($iterator->hasNext()) {
    $row = $iterator->moveNext();
    // process $row
}

After:

while ($iterator->valid()) {
    $row = $iterator->current();
    // process $row
    $iterator->next();
}

Or use PHP's foreach:

foreach ($iterator as $row) {
    // process $row
}

Compatibility

This version requires:

  • PHP 8.1 or higher (including PHP 8.4)
  • AnyDataset Core 6.0 or higher

Description by Korbit AI

What change is being made?

Add support for PHP 8.4 and upgrade byjg/anydataset to version 6.0, while enhancing JSON dataset functionality with improved field handling and validation features.

Why are these changes being made?

These changes were made to ensure compatibility with the latest PHP version 8.4 and to leverage new features provided by byjg/anydataset version 6.0. The modifications improve JSON data manipulation by adding clearer field validation options and path navigation capabilities, ensuring robust and dynamic data handling while aligning with updated dependencies. The updates aim to enhance the usability and flexibility of the library in parsing and managing JSON data within projects.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@korbit-ai korbit-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Performance Redundant Row Parsing ▹ view
Design Large Method with Multiple Responsibilities ▹ view
Files scanned
File Path Reviewed
src/JsonDataset.php
src/JsonFieldDefinition.php
src/JsonIterator.php

Explore our documentation to understand the languages and file types we support and the files we ignore.

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • On any given comment that Korbit raises on your pull request, you can have a discussion with Korbit by replying to the comment.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Current Korbit Configuration

General Settings
Setting Value
Review Schedule Automatic excluding drafts
Max Issue Count 10
Automatic PR Descriptions
Issue Categories
Category Enabled
Documentation
Logging
Error Handling
Readability
Design
Performance
Security
Functionality

Feedback and Support

Note

Korbit Pro is free for open source projects 🎉

Looking to add Korbit to your team? Get started with a free 2 week trial here

Comment thread src/JsonIterator.php
Comment thread src/JsonIterator.php
@byjg
byjg merged commit 4f31aa4 into master Nov 24, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant