Skip to content

7.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Sep 07:14
8c6657f
  • (CHG) PhpredisClient::del() no longer checks for UNLINK support before using it, so RedisSessionHandler with that adapter now requires a Redis 4.0 or later server. The DEL fallback was untestable dead weight: Redis::unlink() has existed since phpredis 4.0.0, and every phpredis build that supports the PHP 8.4 this package requires is far newer than that. PredisClient::del() still issues DEL, because predis is pure PHP and only registered the UNLINK command in 3.5.0, while the adapter supports predis ^2.0 || ^3.0.
  • (ADD) Add RedisSessionHandler, an optional SessionHandlerInterface implementation that stores each session as a single Redis string with a key TTL (the approach used by Symfony, Laravel, and the phpredis native handler). It refreshes only the TTL when data is unchanged (lazy_write), destroys empty sessions, and leaves expiry to Redis. It is decoupled from any specific client via Aura\Session\Redis\RedisClientInterface, with bundled PhpredisClient (ext-redis) and PredisClient (predis/predis) adapters. No hard Redis-client dependency: ext-redis and predis/predis are listed under suggest.
  • (ADD) Add Segment::getFlashAll() and Segment::getFlashNextAll(), which return every flash value for the current or the next request, so flash messages can be rendered without knowing their keys. Both return an empty array when nothing is set. Originally proposed by Jake Johns in #47/#52.
  • (ADD) Depend on the new aura/session-interface (^7.0) package, which provides the shared session/segment contracts.
  • (CHG) Session now implements Aura\Session_Interface\SessionInterface.
  • (CHG) SegmentInterface no longer declares its own methods; it now composes the shared Aura\Session_Interface\SegmentInterface (get/set), ManageableSegmentInterface (getSegment/clear/remove), and FlashSegmentInterface (flash values). The full method set is unchanged, so existing implementations remain compatible.
  • (CHG) Add native return types (bool, mixed, void) to Session::start()/resume()/regenerateId() and to all Segment methods. This is a BC break for subclasses that override these methods without declaring matching return types.