-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[MonologBridge] Prefer PSR-3 to interact with Monolog in tests #27882
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
Conversation
Why on 3.4 and not on master btw? |
PSR-3 should be the recommended way to interact with the logger in Monolog 1 already. Also, the tests don't differ much between 3.4 and master yet, so I thought it might be easier for the maintenance if I apply the change here. But I can rebase to master, if you want me to. |
Let's go on master, these tests are fine for 3.4 IMHO. |
17f8f7d
to
78498d3
Compare
✅ Rebased to master. |
Thank you @derrabus. |
… tests (derrabus) This PR was merged into the 4.2-dev branch. Discussion ---------- [MonologBridge] Prefer PSR-3 to interact with Monolog in tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | part of #27857 | License | MIT | Doc PR | N/A This PR changes tests in the Monolog bridge: * Calls to `Logger::addInfo()` are changed to `Logger::info()`. * The return value of `Logger::debug()`, `Logger::info()`, `Logger::notice()`, `Logger::warning()`, `Logger::error()` etc. is no longer asserted to be `true`. This way, the tests only use PSR-3 compatible code to interact with the logger, which makes them forward-compatible with the changes in Monolog 2. Commits ------- 78498d3 Prefer PSR-3 to interact with Monolog in tests.
This PR changes tests in the Monolog bridge:
Logger::addInfo()
are changed toLogger::info()
.Logger::debug()
,Logger::info()
,Logger::notice()
,Logger::warning()
,Logger::error()
etc. is no longer asserted to betrue
.This way, the tests only use PSR-3 compatible code to interact with the logger, which makes them forward-compatible with the changes in Monolog 2.