Codeception / Codeception/module-phalcon4

SessionManager methods missing

オープン
#13 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
3
フォーク
8
PR マージ指標
30日以内にマージされた PR はありません

説明

When my tests tried to run a test that involved a session destroy, I got an error. Because `MemorySession.php` doesn't actually start the session using `session_start`, `session_destroy` doesn't work either.

Also, `MemorySession.php`'s get and set methods aren't actually used, because the get and set are called from `SessionManager.php`.

I fixed this by adding methods to `SessionManager.php`:

```php
class SessionManager extends Manager
{
//...

public function destroy(): void
{
$this->getAdapter()->destroy($this->getId());
}

public function get(string $key, $defaultValue = null, bool $remove = false)
{
return $this->getAdapter()->get($key, $defaultValue, $remove);
}

public function set(string $key, $value): void
{
$this->getAdapter()->set($key, $value);
}
}

```

Please let me know if this is correct, or if I'm missing something.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。