Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] PSR Log v3 #40087

Merged
merged 4 commits into from
Dec 17, 2021
Merged

[9.x] PSR Log v3 #40087

merged 4 commits into from
Dec 17, 2021

Conversation

driesvints
Copy link
Member

This PR bumps psr/log to v3. Because of the introduction of type-hints for the method arguments we'll need to explicitly add the types that we support as well to widen the method signature.

@@ -262,7 +262,7 @@ protected function formatMessage($message)
return var_export($message->toArray(), true);
}

return $message;
return (string) $message;
Copy link
Member Author

@driesvints driesvints Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this because fireLogEvent always expects the $message to be a string. And also because we pipe the message to a decorated psr/log implementation which in turn expects either a string or a Stringable.

@driesvints driesvints changed the title PSR Log v3 [9.x] PSR Log v3 Dec 17, 2021
@driesvints driesvints marked this pull request as ready for review December 17, 2021 08:49
@taylorotwell taylorotwell merged commit 3202603 into master Dec 17, 2021
@taylorotwell taylorotwell deleted the psr-log-v3 branch December 17, 2021 14:45
@GrahamCampbell
Copy link
Member

It is not necessary to add the typehints. We can still support v3 without them.

@driesvints
Copy link
Member Author

@GrahamCampbell can you pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants