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

Added a way to use psr-3 messages. #1372

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Daniel-KM
Copy link
Contributor

Allows to use psr-3 compliant messages : https://www.php-fig.org/psr/psr-3

When accepted, another pr will allow to use psr strings in logs.

Fixes #1183

@zerocrates
Copy link
Member

What kinds of situations are you envisioning where you might use this new message class outside the messenger or the logger? I'd really prefer to see it use the same code path as is currently used in the messenger for translating the sprintf-based messages... in other words I'd be happier with something that altered the existing Message and created an interface the two message types would share (something like getMessage() and interpolate() or whatever it would be called), and altered our translator to check for that interface rather than Message.

@Daniel-KM
Copy link
Contributor Author

The main usage is messenger and logger. I don't have any other usage currently.

@Daniel-KM Daniel-KM force-pushed the feature/psr_message branch from ef8610b to f6f0d65 Compare March 18, 2019 12:07
@Daniel-KM
Copy link
Contributor Author

In fact, there is another usage: to write e-mails (config form of module GuestUser), where string placeholders are simpler to use by end users.

@Daniel-KM Daniel-KM force-pushed the feature/psr_message branch from f6f0d65 to ee12339 Compare April 15, 2019 04:30
@Daniel-KM
Copy link
Contributor Author

Rebased on 1.4.

@Daniel-KM Daniel-KM mentioned this pull request Jul 17, 2019
@Daniel-KM Daniel-KM force-pushed the feature/psr_message branch from ee12339 to 4fa71e2 Compare October 28, 2019 22:35
@Daniel-KM
Copy link
Contributor Author

Rebased on 2.0.

@Daniel-KM
Copy link
Contributor Author

Merged for laminas.

@Daniel-KM
Copy link
Contributor Author

Merged with upstream/develop.

@Daniel-KM Daniel-KM force-pushed the feature/psr_message branch from ecba1ae to 171e3dc Compare January 6, 2022 12:19
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.

Plan to make log psr-3 compliant
2 participants