Codeception / Codeception/module-phalcon4

SessionManager methods missing

Đang mở
#13 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
3
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.