yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
452 stars 183 forks source link

Make dir sessions in runtime not make sense #240

Open RodrigoDornelles opened 2 years ago

RodrigoDornelles commented 2 years ago

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");
      }
  }
samdark commented 2 years ago

Yes, that could be considered a bug.