PHP 8.6: `yii\web\SessionHandler` misses `create_sid()` (CI failure)
Author: zoranbogoevskimkdCreated Aug 21, 2026Updated Aug 21, 2026
What steps will reproduce the problem?
Run the test suite on PHP 8.6 (nightly), e.g. the build / PHP 8.6 CI job on any current pull request:
1) yiiunit\framework\web\session\CacheSessionTest::testNotWrittenSessionDestroying
Class yii\web\SessionHandler implementing SessionHandlerInterface is missing the create_sid() method which will be required in PHP 9.0
framework/web/SessionHandler.php:19Additional info
SessionHandlerInterface::create_sid() exists since PHP 5.5.1 and PHP 8.6 snapshots started emitting a deprecation for implementations that lack it (it will be required in PHP 9.0). Yii's error handler converts the deprecation into an exception, which currently fails the build / PHP 8.6 job on every PR.
| Q | A |
|---|---|
| Yii version | 2.0.56-dev |
| PHP version | 8.6 (nightly) |
Source: yiisoft/yii2