Skip to content

1.5.0

Choose a tag to compare

@koriym koriym released this 09 Nov 17:29
· 8 commits to 1.x since this release

Changes

Changed

  • PHP 8.2+ Requirement: Updated minimum PHP version from ^8.1 to ^8.2
  • Symfony Cache Update: Updated dependency to ^6.0 || ^7.2
  • Removed doctrine/annotations: Eliminated abandoned dependency, migrated to native PHP 8 attributes
  • Code Modernization: Use readonly properties where applicable for immutability

Removed

  • Serializable interface from cache adapters (now use __serialize/__unserialize magic methods)
  • Unused Php73BcSerializableTrait class
  • Unused RedisInstance annotation class

Added

  • Migration Tools: Added rector-migrate.php for automated annotation-to-attribute migration
  • Migration Guide: Added ANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructions
  • Documentation: Added CLAUDE.md with project architecture and development workflow

Fixed

  • CI/CD workflows updated to latest GitHub Actions versions
  • Replace deprecated set-output with $GITHUB_OUTPUT
  • Add --ignore-platform-req=php for PHP 8.5 compatibility testing
  • rector-migrate.php: Remove hardcoded paths to allow users to specify their own project paths

⚠️ Migration Required

Applications using annotations must migrate to PHP 8 attributes:

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

# Apply migration
vendor/bin/rector process src --config=vendor/ray/psr-cache-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

Supported Annotations

The migration tool automatically converts:

  • @Local#[Local] - For non-shared cache (APCu/Filesystem)
  • @Shared#[Shared] - For shared cache (Redis/Memcached)
  • @CacheDir#[CacheDir] - Cache directory configuration
  • @CacheNamespace#[CacheNamespace] - Cache namespace configuration
  • @RedisConfig#[RedisConfig] - Redis connection configuration
  • @MemcacheConfig#[MemcacheConfig] - Memcached connection configuration