yiisoft/yii2-redis
Redis Cache, Session and ActiveRecord for the Yii framework
2.1.2
13M downloads/mo
#1582 most downloaded on Packagist
yiisoft/yii2-redis
What this package is like to depend on
Last release 3 months ago
07 May 2026
Release timing varies
gaps range from 2 months to 2.4 years
Nearly every release is documented
notes for 24 of 24 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
27 releases · first in 2013
3 releases in the last 12 months
see the full history below
Release timeline
27 releases · Nov 2013 to May 2026
2014
2016
2018
2020
2022
2024
2026
Releases
latest 27-
2.1.207 May 2026Release notes
Open source →- Chg #294: Revert custom retry in
PredisConnectionafter updatepredispackage (@s1lver)
- Chg #294: Revert custom retry in
-
2.1.129 Apr 2026Release notes
Open source →What's Changed
- Dropped PHP 7.3 support to align with Yii2 minimum PHP version by @s1lver in #281
- Add codecov badge by @s1lver in #283
- Add basic PHPStan support by @s1lver in #282
- Fixed badge display by @s1lver in #284
- Applying Yii2 coding standards by @s1lver in #287
- Check for PHP 8.5 by @s1lver in #286
- Enhance
README.mdandinternals.mddocumentation; update scripts incomposer.jsonfor improved testing and code style checks. by @terabytesoftw in #288 - Docs: Component connections by @AugustMiller in #285
- Enhance documentation and add scripts for
composer.json. by @terabytesoftw in #290 - Fix infinite loop in parseResponse() when fread() returns empty string on broken socket by @dkostik in #291
- Fix #292: Fixed
fwrite()supplied resource is not a valid stream, bump versionpredis/predisto3.4by @s1lver in #292 - Update PHP, Yii2 dependency in
composer.json, and updateCHANGELOG.md. by @terabytesoftw in #293
New Contributors
- @AugustMiller made their first contribution in #285
- @dkostik made their first contribution in #291
Full Changelog: 2.1.0...2.1.1
Release notes
Open source →- Bug #281: PHP 7.4 compatibility is now fixed (@s1lver)
- Bug #291: Prevent infinite loop in
parseResponse()whenfread()returns empty string on broken socket (@dkostik) - Bug #292: Fixed
fwrite()supplied resource is not a valid stream (@s1lver) - Enh #281: PHP 7.3 support was removed to align with Yii2 minimum PHP version (@s1lver)
- Enh #282: Static analysis with PHPStan has been added (@s1lver)
- Enh #287: Applying Yii2 coding standards (@s1lver)
- Chg #292: Bump version
predis/predisto3.4(@s1lver) - Chg #293: Update PHP, Yii2 dependency in
composer.json, and updateCHANGELOG.md(@terabytesoftw)
-
2.1.025 Dec 2025Release notes
Open source →- Fix #278: Prevent
nullparameter onSocketExceptionto avoid PHP 8.4 implicity nullable types deprecation (HenryVolkmer) - New #276: Added support for predis (antonshevelev)
- New #276: Changed default value of
yii\redis\Cache::$forceClusterModetofalse(antonshevelev) - New #276: Implemented
yii\redis\ConnectionInterfaceinyii\redis\Connection(antonshevelev)
- Fix #278: Prevent
-
2.0.2005 Jun 2025Release notes
Open source →- Bug CVE-2025-48493: Prevent logging
AUTHparameters whenYII_DEBUGis off (samdark) - Bug #270: Prevent null parameter on
mb_strlento avoid PHP 8.4 implicity nullable types deprecation (tehmaestro)
- Bug CVE-2025-48493: Prevent logging
-
2.0.1913 Feb 2025Release notes
Open source →- Enh #264: Improve performance of
mget()for big list of keys (alx-xc, rob006)
- Enh #264: Improve performance of
-
2.0.1804 Sep 2022Release notes
Open source →- Enh #249 Added support to set the redis scheme to tls. Add to configuration:
'scheme' => 'tls'(tychovbh) - Bug #247:
Cache::getValue()now returnsfalsein case of missing key (rhertogh)
- Enh #249 Added support to set the redis scheme to tls. Add to configuration:
-
2.0.1711 Jan 2022Release notes
Open source →- Enh #176: Fix reconnect logic bug, add
protected function sendRawCommand()(ilyaplot)
- Enh #176: Fix reconnect logic bug, add
-
2.0.1604 Oct 2021Release notes
Open source →- Enh #223: Add
Connection::$usernamefor using username for authentication (samdark, rvkulikov)
- Enh #223: Add
-
2.0.1505 May 2021Release notes
Open source →- Enh #227: Added support for adjusting PHP context options and parameters. This allows e.g. supporting self-signed certificates (akselikap)
-
2.0.1410 Nov 2020Release notes
Open source →- Bug #215: Fix
Connection::isActive()returnsfalsewhen the connection is active (cornernote) - Enh #212: Added support for the 'session.use_strict_mode' ini directive in
yii\web\Session(rhertogh)
- Bug #215: Fix
-
2.0.1302 May 2020Release notes
Open source →- Enh #210: Add Redis 5.0 stream commands. Read more at streams intro (sartor)
-
2.0.1213 Mar 2020Release notes
Open source →- Bug #182: Better handle
cache/flush-allcommand when cache component is using shared database (rob006) - Bug #190: Accept null values (razonyang)
- Bug #191: getIsActive() returns true when socket is not connected (mdx86)
- Enh #174: Add ability to set up SSL connection (kulavvy)
- Enh #195: Use
Instance::ensure()to initializeSession::$redis(rob006) - Enh #199: Increase frequency of lock tries when
$timeoutis used inMutex::acquire()(rob006)
- Bug #182: Better handle
-
2.0.1105 Nov 2019Release notes
Open source →- Enh #66, #134, #135, #136, #142, #143, #147: Support Redis in cluster mode (hofrob)
-
2.0.1022 Oct 2019Release notes
Open source →- Enh #188: Added option to wait between connection retry (marty-macfly, rob006)
-
2.0.923 Sep 2018Release notes
Open source →- Bug #166: zrangebyscore without scores does not work (razonyang)
- Enh #13: Added
>,<,>=and<=conditions support in ActiveQuery (nailfor, zacksleo)
-
2.0.820 Mar 2018Release notes
Open source →- Bug #141: Calling ActiveQuery::indexBy() had no effect since Yii 2.0.14 (cebe)
- Bug: (CVE-2018-8073): Fix possible remote code execution when improperly filtered user input is passed to
ActiveRecord::findOne()and::findAll()(cebe) - Enh #66: Cache component can be configured to read / get from replicas (ryusoft)
-
2.0.711 Dec 2017Release notes
Open source →- Bug #114: Fixed ActiveQuery
not betweenandnotconditions which where not working correctly (cebe, ak1987) - Bug #123: Fixed ActiveQuery to work with negative limit values, which are used in ActiveDataProvider for the count query (cebe)
- Enh #9: Added orderBy support to redis ActiveQuery and LuaScriptBuilder (valinurovam)
- Enh #91: Added option to retry connection after failing to communicate with redis server on stale socket (cebe)
- Enh #106: Improved handling of connection errors and introduced
yii\redis\SocketExceptionfor these (cebe) - Chg #127: Added PHP 7.2 compatibility (brandonkelly)
- Bug #114: Fixed ActiveQuery
-
2.0.605 Apr 2017Release notes
Open source →- Bug #44: Remove quotes from numeric parts of composite key to avoid problem with different hashes for the same record (uniserpl)
- Bug #67: Fixed regression from 2.0.5, reconnecting a closed connection fails (cebe)
- Bug #82: Fixed session object destruction failure when key expires (juffin-halli, samdark)
- Bug #93: Fixed
yii\redis\ActiveRecord::deleteAll()with condition (samdark) - Bug #104: Fixed execution of two-word commands (cebe,branimir93)
- Enh #53: Added
Mutexthat implements a Redis based mutex (turboezh, sergeymakinen) - Enh #81: Allow setting
Connection::$databasetonullto avoid sending aSELECTcommand after connection (cebe) - Enh #89: Added support for
\yii\db\QueryInterface::emulateExecution()(samdark) - Enh #103: Added missing commands and
@methoddocumentation for redis commands (cebe) - Enh: Optimized find by PK for relational queries and IN condition (cebe, andruha)
-
2.0.517 Mar 2016Release notes
Open source →- Bug #22: Fixed string escaping issue in LuaScriptBuilder (vistart)
- Bug #37: Fixed detection of open socket (mirocow)
- Bug #46: Fixed bug to execute session_regenerate_id in PHP 7.0 (githubjeka)
- Enh #31: Added
Connection::$socketClientFlagsproperty for connection flags to be passed tostream_socket_client()(hugh-lee) - Chg #14: Added missing
BLPOPcommand to$redisCommands(samdark) - Chg #61: Added missing
GEO*commands to$redisCommands(leadermt)
-
2.0.410 May 2015Release notes
Open source →- Enh #8: Auto increment value was not updated when a primary key was explicitly set (cebe, andruha)
-
2.0.301 Mar 2015 -
2.0.211 Jan 2015Release notes
Open source →- Bug #6547: Fixed redis connection to deal with large data in combination with
mget()(pyurin)
- Bug #6547: Fixed redis connection to deal with large data in combination with
-
2.0.107 Dec 2014Release notes
Open source →- Bug #4745: value of simple string returns was ignored by redis client and
trueis returned instead, now onlyOKwill result in atruewhile all other values are returned as is (cebe) - Enh #3714: Added support for connecting to redis server using a unix socket (savvot, robregonm)
- Bug #4745: value of simple string returns was ignored by redis client and
-
2.0.012 Oct 2014 -
2.0.0-rc28 Sep 2014 pre-releaseRelease notes
Open source →- Bug #1311: Fixed storage and finding of
nulland boolean values (samdark, cebe) - Enh #3520: Added
unlinkAll()-method to active record to remove all records of a model relation (NmDimas, samdark, cebe) - Enh #4048: Added
initevent toActiveQueryclasses (qiangxue) - Enh #4086: changedAttributes of afterSave Event now contain old values (dizews)
- Bug #1311: Fixed storage and finding of
-
2.0.0-beta13 Apr 2014 pre-releaseRelease notes
Open source →- Bug #1993: afterFind event in AR is now called after relations have been populated (cebe, creocoder)
- Enh #1773: keyPrefix property of Session and Cache is not restricted to alnum characters anymore (cebe)
- Enh #2002: Added filterWhere() method to yii\redis\ActiveQuery to allow easy addition of search filter conditions by ignoring empty search fields (samdark, cebe)
- Enh #2892: ActiveRecord dirty attributes are now reset after call to
afterSave()so information about changed attributes is available inafterSave-event (cebe) - Chg #2281: Renamed
ActiveRecord::create()topopulateRecord()and changed signature. This method will not call instantiate() anymore (cebe) - Chg #2146: Removed
ActiveRelationclass and moved the functionality toActiveQuery. All relational queries are now directly served byActiveQueryallowing to use custom scopes in relations (cebe)
-
2.0.0-alpha30 Nov 2013 pre-release