Skip to content

Commit

Permalink
Merge pull request #23409 from demeritcowboy/psrlog
Browse files Browse the repository at this point in the history
dev/drupal#176 - Allow wider range of psr-log versions to be installed
  • Loading branch information
totten committed May 11, 2022
2 parents 6c2cb2c + ada741b commit 15348d0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/Error/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function getMap():array {
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = []) {
public function log($level, $message, array $context = []): void {
// FIXME: This flattens a $context a bit prematurely. When integrating
// with external/CMS logs, we should pass through $context.
if (!empty($context)) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/EchoLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CRM_Utils_EchoLogger extends Psr\Log\AbstractLogger implements \Psr\Log\Lo
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = []) {
public function log($level, $message, array $context = []): void {
echo $message . "\n";
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/SystemLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = []) {
public function log($level, $message, array $context = []): void {
if (!isset($context['hostname'])) {
$context['hostname'] = CRM_Utils_System::ipAddress();
}
Expand Down
2 changes: 1 addition & 1 deletion Civi/Api4/Action/System/RotateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function _run(Result $result) {
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = []) {
public function log($level, $message, array $context = []): void {
$evalVar = function($m) use ($context) {
return $context[$m[1]] ?? '';
};
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"symfony/filesystem": "~3.0 || ~4.4",
"symfony/process": "~3.0 || ~4.4",
"symfony/var-dumper": "~3.0 || ~4.4 || ~5.1",
"psr/log": "~1.0",
"psr/log": "~1.0 || ~2.0 || ~3.0",
"symfony/finder": "~3.0 || ~4.4",
"tecnickcom/tcpdf" : "6.4.*",
"totten/ca-config": "~22.05",
Expand Down

0 comments on commit 15348d0

Please sign in to comment.