Remove outdated doctrine/cache package and change configuration

This commit is contained in:
2026-05-26 15:38:15 +00:00
parent 9f339953fe
commit 23f00b2374
7 changed files with 295 additions and 518 deletions

View File

@@ -0,0 +1,63 @@
<?php
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
namespace CloudObjects\SDK\TestHelpers;
use Psr\Log\LoggerInterface;
class InMemoryLogger implements LoggerInterface {
private $logs = [];
public function getLogs() : array {
return $this->logs;
}
public function getLastLogMessage() : string {
if (empty($this->logs)) {
return '';
}
return end($this->logs)['message'];
}
public function emergency(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'emergency', 'message' => (string)$message, 'context' => $context ];
}
public function alert(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'alert', 'message' => (string)$message, 'context' => $context ];
}
public function critical(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'critical', 'message' => (string)$message, 'context' => $context ];
}
public function error(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'error', 'message' => (string)$message, 'context' => $context ];
}
public function warning(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'warning', 'message' => (string)$message, 'context' => $context ];
}
public function notice(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'notice', 'message' => (string)$message, 'context' => $context ];
}
public function info(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'info', 'message' => (string)$message, 'context' => $context ];
}
public function debug(string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => 'debug', 'message' => (string)$message, 'context' => $context ];
}
public function log($level, string|\Stringable $message, array $context = []): void {
$this->logs[] = [ 'level' => $level, 'message' => (string)$message, 'context' => $context ];
}
}