When tying to use the LoggerTrait on a drupal 10 site I am met with the following. Fatal error: Declaration of weitzman\DrupalTestTraits\LoggerTrait::log($level, $message, array $context = []) must be compatible with Drupal\Core\Logger\RfcLoggerTrait::log($level, Stringable|string $message, array $context = []): void in /xxx/weitzman/drupal-test-traits/src/LoggerTrait.php on line 32
To get this error I updated my drupal 9 site to drupal 10. It passed all the tests in the pipeline other than this one.
This function should be updated to the new drupal 10 format. It looks like there are patches for other similar loggers out there. They basically look like the following:
- public function log($level, $message, array $context = []) {
+ public function log($level, string|\Stringable $message, array $context = []): void {
Closed: duplicate
Code