Skip to content

Conversation

@byjg
Copy link
Owner

@byjg byjg commented Apr 6, 2025

This PR introduces version 6.0 of the AnyDataset NoSQL library with significant improvements and breaking changes.

Major Changes

  • PHP 8.1+ Required: Upgraded minimum PHP version requirement to PHP 8.1
  • Type-Safe DynamoDB Attributes: Added new DynamoDbAttributeType enum for type-safe attribute definitions
  • Enhanced DynamoDB Support: Improved handling of complex data types (Maps, Lists, Sets)
  • Updated Dependencies: All dependencies updated to version 6.0
  • PHPUnit & Psalm Updates: Support for PHPUnit 10.5/11.5 and Psalm 5.9/6.2
  • IDE Support: Added configuration files for PhpStorm, VS Code, and Gitpod
  • Documentation: Comprehensive documentation updates for all drivers

Breaking Changes

Component Change Impact
PHP Version Minimum PHP 8.1 required (previously 7.x) Applications using PHP < 8.1 will need to upgrade
DynamoDB Driver String constants replaced with enum Code using string constants for DynamoDB types needs to be updated
Dependencies All ByJG dependencies updated to ^6.0 Projects using older versions need to update dependencies
PHPUnit Updated to PHPUnit 10.5/11.5 Test suites may need adjustments for PHPUnit compatibility

DynamoDB Attribute Type Enum

The most significant change is the introduction of the DynamoDbAttributeType enum, which replaces string constants for DynamoDB attribute types:

// Before (string constants)
$options = [
    "KeyName" => "id",
    "Types" => [
        "id" => "N",
        "name" => "S"
    ]
];

// After (type-safe enum)
use ByJG\AnyDataset\NoSql\Enum\DynamoDbAttributeType;

$options = [
    "KeyName" => "id",
    "Types" => [
        "id" => DynamoDbAttributeType::NUMBER,
        "name" => DynamoDbAttributeType::STRING
    ]
];

<!-- Korbit AI PR Description Start -->
## Description by Korbit AI


### What change is being made?
Upgrade PHP AnyDataset NoSQL to version 6.0 with support for PHP 8.4 and enhanced documentation, tests, and source code.

### Why are these changes being made?
To ensure compatibility with PHP 8.4 and current best practices while introducing new features like type-safe DynamoDB attribute definitions, unified connection string formats, enhanced caching mechanisms with PSR-16 compatibility, and updated documentation for improved developer experience. These changes address evolving requirements for improved consistency in interfacing with various NoSQL data sources.


> Is this description stale? Ask me to generate a new description by commenting `/korbit-generate-pr-description`
<!-- Korbit AI PR Description End -->

Copy link

@korbit-ai korbit-ai bot left a comment

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 Status
Readability Monolithic Type Conversion Logic ▹ view
Files scanned
File Path Reviewed
src/Enum/DynamoDbAttributeType.php
src/Cache/KeyValueCacheEngine.php
src/AwsS3Driver.php
src/CloudflareKV.php
src/MongoDbDriver.php
src/AwsDynamoDbDriver.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

byjg added 2 commits August 23, 2025 20:00
- Adjusted `writeConcern` parameter formatting in `MongoDbDriver`.
- Enhanced `MongoDbDriverTest` to handle missing test infrastructure gracefully.
- Updated documentation with new `docker compose` syntax and test setup steps.
- Added `DOC_TOKEN` secret handling in PHP workflow.
…d methods for better readability and maintainability.
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.

2 participants