Skip to content

Releases: ray-di/Ray.AuraSqlModule

1.17.1

13 Mar 00:38

Choose a tag to compare

Added

  • Psalm taint annotations (@psalm-taint-sink sql) for SQL injection analysis (PR #89)

1.17.0

20 Nov 09:14
9ce6181

Choose a tag to compare

PHP Version Support Expansion

This release significantly expands PHP version support from PHP 8.4 only to PHP 8.1 through 8.5.

Supported PHP Versions

  • ✅ PHP 8.1 - Active support with LTS
  • ✅ PHP 8.2 - Current stable
  • ✅ PHP 8.3 - Current stable
  • ✅ PHP 8.4 - Current stable
  • ✅ PHP 8.5 - Experimental (upcoming release)

Major Changes

Dependency Updates

  • PHP: ^8.1 (was ^8.4)
  • aura/sql: ^5.0 || ^6.0 (added 5.x for PHP 8.1-8.3 support)
  • PHPUnit: ^10.5 || ^11.5 || ^12.4 (added 10.x for PHP 8.1 support)
  • ray/di, ray/aop: ^2.16.1 || ^2.17 || ^2.18 || ^2.19 (expanded version range)
  • ray/compiler: ^1.12 (restricted from 1.13+ which requires PHP 8.2+)
  • Added symfony/polyfill-php83 for #[Override] attribute support on PHP 8.1-8.2

Code Compatibility

  • Removed readonly from class declarations (PHP 8.2+ feature)
  • Maintained readonly on properties (PHP 8.1+ feature)
  • Removed typed class constants (PHP 8.3+ feature)
  • Fixed new Class()->method() syntax to (new Class())->method()

CI Configuration

  • Custom workflow supporting multiple PHP versions
  • PHP 8.1-8.3: Both highest and lowest dependency tests
  • PHP 8.4: Highest only (prefer-lowest skipped due to aura/sql compatibility)
  • PHP 8.5: Experimental with continue-on-error
  • Platform PHP set to 8.4.99 for static analysis tools compatibility

Breaking Changes

None - this release is backward compatible. All code that worked on PHP 8.4 continues to work.

Full Changelog

1.16.0...1.17.0

🤖 Generated with Claude Code

1.16.0

19 Nov 14:24
3883f92

Choose a tag to compare

Parameter-level Attributes for Ray.Di 2.19.1

Summary

This release migrates Ray.AuraSqlModule to use parameter-level attributes for dependency injection, ensuring compatibility with Ray.Di 2.19.1.

Breaking Changes

⚠️ Requires Ray.Di ^2.19.1 and Ray.Aop ^2.19

Ray.Di 2.19.0 removed method-level attribute support for qualified parameters. This release migrates all qualifier attributes to parameter-level, aligning with PHP 8's native attribute targeting.

Changes

Attribute Definitions

Updated qualifier attributes to target parameters instead of methods:

  • AuraSqlQueryConfig: TARGET_METHODTARGET_PARAMETER
  • EnvAuth: TARGET_METHODTARGET_PARAMETER
  • PagerViewOption: TARGET_PARAMETER, made $value optional
  • Test fixtures updated accordingly

Module Configuration

Enhanced Validation

  • NamedPdoModule now validates non-empty qualifiers in constructor
    • Throws InvalidArgumentException with clear error message
    • Directs users to AuraSqlModule for unqualified bindings
    • Simplified internal logic

Array Format for toConstructor

Migrated from legacy string format to array format:

// Before
'dsn=pdo_dsn,username=pdo_user'

// After
['dsn' => 'pdo_dsn', 'username' => 'pdo_user']

Bug Fixes

  • Fixed NamedPdoModule to properly pass $options and $queries parameters to ExtendedPdo
  • Added missing driver_options and after_connect parameter bindings

Code Quality Improvements

  • Eliminated conditional binding anti-patterns via method splitting
  • Separate methods for qualified/unqualified configuration paths
  • Improved PHPStan compatibility with type-safe qualifier handling
  • Better code maintainability and readability

Testing

  • Added test coverage for empty qualifier validation
  • All 76 tests passing with 145 assertions
  • PHPStan, PHPCS, and Psalm checks passing

Cleanup

  • Removed deprecated ServiceLocator setup from tests
  • Removed coverage configuration from phpunit.xml.dist
  • Coverage now generated only when explicitly requested

Migration Guide

If you're using Ray.Di < 2.19.1, update your dependencies:

composer require ray/di:^2.19.1 ray/aop:^2.19

No code changes required in your application - the attribute migration is internal to the module.

Related

  • Depends on ray-di/Ray.Di#306 (Ray.Di 2.19.1)
  • Part of Ray.MediaQuery 1.0 preparation

1.15.2

10 Nov 02:57

Choose a tag to compare

Critical Fix

Fixed

  • Migration Tool: Fixed rector-migrate.php to work correctly with user projects
    • Removed hardcoded withPaths() that prevented migration from working
    • Users can now specify target paths via command line arguments
    • Added documentation for processing multiple directories
    • Matches pattern used in Ray.PsrCacheModule (PR #32)
  • Type Annotations: Fixed PDO options type from array<string> to array<string, mixed> in 8 files
  • Doctrine Annotations Cleanup: Removed all remaining Doctrine annotation syntax from docblocks in source and test files

Changed

  • Code Modernization: Converted annotation classes to readonly classes
    • Ray\AuraSqlModule\Annotation\Transactional
    • Ray\AuraSqlModule\Annotation\PagerViewOption
    • Ray\AuraSqlModule\Annotation\AuraSqlQueryConfig
    • Ray\AuraSqlModule\Annotation\Read

⚠️ Migration Tool Fix

Previous versions (1.15.0, 1.15.1) had a critical bug that prevented the migration tool from working with user projects. This release fixes that issue.

How to Migrate (Fixed)

# Process a single directory
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php --dry-run
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php

# Process multiple directories  
vendor/bin/rector process src tests --config=vendor/ray/aura-sql-module/rector-migrate.php

See ANNOTATION_TO_ATTRIBUTE.md for detailed migration guide.

Note

  • This is a critical fix for users migrating from annotations to attributes
  • Migration guide has been verified to work correctly with real user projects
  • All annotation classes are now readonly (PHP 8.2+ feature)
  • This fix is also available in 1.13.6 for PHP 8.0-8.3 users

Related PRs

  • #81: Readonly classes conversion
  • #83: Doctrine annotation cleanup + rector-migrate.php fix

1.13.6

10 Nov 02:57

Choose a tag to compare

Critical Fix for PHP 8.0-8.3

Fixed

  • Migration Tool: Fixed rector-migrate.php to work correctly with user projects
    • Removed hardcoded withPaths() that prevented migration from working
    • Users can now specify target paths via command line arguments
    • Added documentation for processing multiple directories
    • Matches pattern used in Ray.PsrCacheModule (PR #32)

⚠️ Migration Tool Fix

Previous versions (1.13.4, 1.13.5) had a critical bug that prevented the migration tool from working with user projects. This release fixes that issue.

How to Migrate (Fixed)

# Process a single directory
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php --dry-run
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php

# Process multiple directories
vendor/bin/rector process src tests --config=vendor/ray/aura-sql-module/rector-migrate.php

See ANNOTATION_TO_ATTRIBUTE.md for detailed migration guide.

Note

  • This is a critical fix for PHP 8.0-8.3 users migrating from annotations to attributes
  • Migration guide has been verified to work correctly with real user projects
  • This is a backport of the fix from 1.15.2 (PHP 8.4+)

Version Strategy

  • 1.13.x: PHP 8.0-8.3 support
  • 1.15.x+: PHP 8.4+ support

Related PR

  • #84: rector-migrate.php fix for 1.13.x

1.15.1

09 Nov 14:06

Choose a tag to compare

Fix incorrect version references in migration documentation

1.13.5

09 Nov 14:06

Choose a tag to compare

Fix incorrect version references in migration documentation

1.15.0

08 Nov 16:08
3395ce4

Choose a tag to compare

Changes

Changed

  • PHP 8.4 Requirement: Updated minimum PHP version to ^8.4
  • Aura.Sql v6: Updated dependency from ^5.0 to ^6.0 for PHP 8.4 compatibility
  • Removed doctrine/annotations: Eliminated abandoned dependency, migrated to native PHP 8 attributes
  • Code Modernization: Applied Rector refactoring for cleaner, modern PHP 8.4 code

Added

  • Migration Tools: Added rector-migrate.php for automated annotation-to-attribute migration
  • Migration Guide: Added ANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructions
  • CI Enhancement: Added Scrutinizer CI configuration for automated code quality analysis

⚠️ Migration Required

Applications using annotations must migrate to PHP 8 attributes:

# Preview changes
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php --dry-run

# Apply migration
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php

See ANNOTATION_TO_ATTRIBUTE.md for detailed migration guide.

Why This Change?

The doctrine/annotations package has been officially abandoned by its maintainers and will no longer receive updates or security patches. This change:

  • Eliminates security and compatibility risks from the abandoned package
  • Adopts native PHP 8 attributes as the modern standard
  • Improves performance (no runtime annotation parsing overhead)
  • Provides migration tooling for users to update their applications

Why Not a Major Version Update?

While this release requires PHP 8.4 and removes doctrine/annotations, we consider it a minor version (1.15.0) rather than a major version (2.0.0) for the following reasons:

No Public API Changes

  • All public interfaces, classes, and methods remain identical
  • The annotation-to-attribute migration is purely a syntax change
  • Existing code continues to work after applying the automated migration

Automated Migration Available

  • We provide Rector configuration for one-command migration
  • The migration process is safe, tested, and reversible
  • Migration Guide includes comprehensive documentation and troubleshooting

Semantic Versioning Perspective

  • Per semver, breaking changes are defined as incompatible API changes
  • While runtime requirements changed (PHP version, dependencies), the API contract remains stable
  • This follows the principle that if your code works on PHP 8.4 with attributes, the upgrade path is clear and automated

Version Strategy

  • Version 1.13.x continues to support PHP 8.0-8.3 with annotations
  • Version 1.15.0+ targets PHP 8.4+ with attributes
  • Users can choose the appropriate version for their PHP environment

1.13.4

08 Nov 16:24

Choose a tag to compare

Changes

Changed

  • Removed doctrine/annotations: Eliminated abandoned dependency from PHP 8.0-8.3 codebase
  • Migrated to PHP 8 Attributes: All Ray.AuraSqlModule annotations now use native PHP 8 attributes
  • Updated aura/sqlquery: Changed constraint from 3.x-dev to ^3.0 for stability
  • CI Update: Test matrix now covers PHP 8.0, 8.1, 8.2, and 8.3 only

Added

  • Migration Tools: Added rector-migrate.php for automated annotation-to-attribute migration
  • Migration Guide: Added ANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructions

⚠️ Migration Required

Applications using Ray.AuraSqlModule annotations must migrate to PHP 8 attributes:

# Preview changes
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php --dry-run

# Apply migration
vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php

See ANNOTATION_TO_ATTRIBUTE.md for detailed migration guide.

If You Want to Continue Using Annotations

If you prefer to continue using doctrine/annotations (not recommended due to security risks), lock to version 1.13.3:

{
  "require": {
    "ray/aura-sql-module": "1.13.3"
  }
}

Note: Version 1.13.3 contains the abandoned doctrine/annotations dependency and will not receive security updates.

Why This Change?

The doctrine/annotations package has been officially abandoned by its maintainers and will no longer receive updates or security patches. This change:

  • Eliminates security and compatibility risks from the abandoned package
  • Adopts native PHP 8 attributes as the modern standard
  • Improves performance (no runtime annotation parsing overhead)
  • Provides migration tooling for users to update their applications

Why a Patch Version (1.13.4)?

This release is numbered 1.13.4 because versions 1.14.0 and 1.14.1 had already been released on the main branch. The 1.13.x branch is a maintenance branch specifically for PHP 8.0-8.3 users.

Version History Context

  • 1.14.0, 1.14.1: Already released on main branch
  • 1.13.x: Maintenance branch for PHP 8.0-8.3
  • 1.13.4: This release - removes abandoned dependency as a security fix

Why This Is Still Appropriate

  • Security Patch Priority: Removing an abandoned dependency is fundamentally a security fix
  • Maintenance Branch: The 1.13.x branch serves PHP 8.0-8.3 users who cannot upgrade to PHP 8.4
  • Clear Migration Path: Automated tools and comprehensive documentation minimize friction
  • Alternative Available: Users can lock to 1.13.3 if immediate migration is not possible

No Public API Changes

  • All public interfaces, classes, and methods remain identical
  • The annotation-to-attribute migration is purely a syntax change
  • Existing code continues to work after applying the automated migration

Semantic Versioning Perspective

  • Per semver, breaking changes are defined as incompatible API changes
  • While migration is required, the API contract remains stable
  • This follows the principle that if your code works on PHP 8.0-8.3 with attributes, the upgrade path is clear and automated

Version Strategy

  • Version 1.13.3 and earlier: PHP 8.0-8.3 with doctrine/annotations (abandoned, security risk)
  • Version 1.13.4+: PHP 8.0-8.3 with native PHP 8 attributes (recommended)
  • Version 1.14.x: Main branch releases
  • Version 1.15.0+: PHP 8.4+ with native PHP 8 attributes
  • Users can choose the appropriate version for their PHP environment

1.14.1

28 May 12:15
93745e0

Choose a tag to compare

What's Changed

  • Use Rector to upgrade codebase to PHP 8.4 by @koriym in #77

Full Changelog: 1.14.0...1.14.1