Skip to content

Commit

Permalink
Support all versions of PSR Log
Browse files Browse the repository at this point in the history
  • Loading branch information
craig410 committed Oct 27, 2023
1 parent 7fdedf1 commit 34417b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Unreleased

* Support psr/log ^1.1 || ^2.0 || ^3.0

### v1.20.0 (2023-10-17)

* Add DateIntervalUtils to stringify a DateInterval, and DateIntervalFactory for shorthand creation
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ext-pdo": "~8.1.0 || ~8.2.0",
"ext-sodium": "~8.1.0 || ~8.2.0",
"php": "~8.1.0 || ~8.2.0",
"psr/log": "^1.1"
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^3.3",
Expand Down
2 changes: 1 addition & 1 deletion src/Logging/StackdriverApplicationLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function __construct(
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = [])
public function log($level, string|\Stringable $message, array $context = []): void
{
// These are the only `context` keys that will be used as top-level properties. Anything else is moved to a
// `custom_context` key to prevent it overwriting internal metadata and low-level log entry properties e.g.
Expand Down

0 comments on commit 34417b1

Please sign in to comment.