Redis + RateLimiting Unit Test
This commit is contained in:
@@ -17,6 +17,10 @@ class RedisConnection {
|
||||
$this->link = new \Redis();
|
||||
}
|
||||
|
||||
public function getLogger(): Logger {
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
public function connect(ConnectionData $connectionData): bool {
|
||||
try {
|
||||
$this->link->connect($connectionData->getHost(), $connectionData->getPort());
|
||||
|
||||
@@ -21,14 +21,14 @@ class Context {
|
||||
private static Context $instance;
|
||||
|
||||
private ?SQL $sql;
|
||||
private ?Session $session;
|
||||
protected ?Session $session;
|
||||
private ?User $user;
|
||||
private Configuration $configuration;
|
||||
private Language $language;
|
||||
public ?Router $router;
|
||||
private ?RedisConnection $redis;
|
||||
protected ?RedisConnection $redis;
|
||||
|
||||
private function __construct() {
|
||||
protected function __construct() {
|
||||
|
||||
$this->sql = null;
|
||||
$this->session = null;
|
||||
|
||||
@@ -20,7 +20,7 @@ class Session extends DatabaseEntity {
|
||||
private User $user;
|
||||
private DateTime $expires;
|
||||
#[MaxLength(45)] private string $ipAddress;
|
||||
#[MaxLength(36)] private string $uuid;
|
||||
#[MaxLength(36)] protected string $uuid;
|
||||
#[DefaultValue(true)] private bool $active;
|
||||
#[MaxLength(64)] private ?string $os;
|
||||
#[MaxLength(64)] private ?string $browser;
|
||||
|
||||
Reference in New Issue
Block a user