Declaration of LoggerTrait::log no longer matches Drupal\Core\Logger\RfcLoggerTrait::log
Describe the bug When running tests against Drupal 10, receive the error
PHP 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 /tmp/test/atools/install/vendor/weitzman/drupal-test-traits/src/LoggerTrait.php on line 32
It seems the abstract definition in core/lib/Drupal/Core/Logger/RfcLoggerTrait.php has changed to
/**
* {@inheritdoc}
*/
abstract public function log($level, string|\Stringable $message, array $context = []): void;
To Reproduce Steps to reproduce the behavior:
- Install Drupal > 10.0
- Run an ExistingSite test which includes a logger.
Expected behavior
Expecting no errors thrown
Screenshots
Desktop (please complete the following information):
- OS: MacOS
- Browser N/A
- Version N/A
Additional context
This is occurring locally in DDEV and Docker Desktop.
Edited by Mark Casias
