yii2-redis icon indicating copy to clipboard operation
yii2-redis copied to clipboard

Make dir sessions in runtime not make sense

Open RodrigoDornelles opened this issue 3 years ago • 1 comments

Because redis session inherits the default session class, it ends up creating the session folder, this could be removed.

I'm in doubt about the best way to remove this abstraction would be unnecessary, as it's all tied to file sessions.

https://github.com/yiisoft/yii2/blob/36ef75338536e855432ae7bd4a24d455fde63f90/framework/web/Session.php#L379

public function setSavePath($value)
  {
      $path = Yii::getAlias($value);
      if (is_dir($path)) {
          session_save_path($path);
      } else {
          throw new InvalidArgumentException("Session save path is not a valid directory: $value");
      }
  }

RodrigoDornelles avatar Dec 15 '21 13:12 RodrigoDornelles

Yes, that could be considered a bug.

samdark avatar Dec 15 '21 13:12 samdark