Releases: ray-di/Ray.AuraSqlModule
1.17.1
1.17.0
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
readonlyfrom class declarations (PHP 8.2+ feature) - Maintained
readonlyon 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
🤖 Generated with Claude Code
1.16.0
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
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_METHOD→TARGET_PARAMETEREnvAuth:TARGET_METHOD→TARGET_PARAMETERPagerViewOption:TARGET_PARAMETER, made$valueoptional- Test fixtures updated accordingly
Module Configuration
Enhanced Validation
- NamedPdoModule now validates non-empty qualifiers in constructor
- Throws
InvalidArgumentExceptionwith clear error message - Directs users to
AuraSqlModulefor unqualified bindings - Simplified internal logic
- Throws
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
NamedPdoModuleto properly pass$optionsand$queriesparameters to ExtendedPdo - Added missing
driver_optionsandafter_connectparameter 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
ServiceLocatorsetup 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.19No 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
Critical Fix
Fixed
- Migration Tool: Fixed
rector-migrate.phpto 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)
- Removed hardcoded
- Type Annotations: Fixed PDO options type from
array<string>toarray<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\TransactionalRay\AuraSqlModule\Annotation\PagerViewOptionRay\AuraSqlModule\Annotation\AuraSqlQueryConfigRay\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.phpSee 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
1.13.6
Critical Fix for PHP 8.0-8.3
Fixed
- Migration Tool: Fixed
rector-migrate.phpto 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)
- Removed hardcoded
⚠️ 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.phpSee 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
1.13.5
1.15.0
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.phpfor automated annotation-to-attribute migration - Migration Guide: Added
ANNOTATION_TO_ATTRIBUTE.mdwith 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.phpSee 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
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-devto^3.0for stability - CI Update: Test matrix now covers PHP 8.0, 8.1, 8.2, and 8.3 only
Added
- Migration Tools: Added
rector-migrate.phpfor automated annotation-to-attribute migration - Migration Guide: Added
ANNOTATION_TO_ATTRIBUTE.mdwith 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.phpSee 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