mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #1347] Is Monolog 1.x (1.24) compatible with PHP 7.2? #563
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#563
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bigtunacan on GitHub (Jul 10, 2019).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1347
I'm in progress of upgrading a PHP 5.3 application to PHP 7.2 that is using monolog. I'm trying to use the latest 1.x series (1.24) of Monolog which is working on the existing PHP 5.3 servers, but appears to have issues on PHP 7.2? It is unclear to me from the documentation if the 1.x series should be compatible with PHP 7.2.
@xabbuh commented on GitHub (Jul 11, 2019):
I use Monolog 1 without any issue on PHP 7.2. What issues did you run into?
@bigtunacan commented on GitHub (Jul 11, 2019):
We have a logging class that extends Monolog\Logger to provide convenient formatted logging to syslog. It has worked for years with PHP 5.3. Now that we are on PHP 7.2 nothing writes to the logs and even we will get silent code failures. The app will stop running once it hits a call to log, but if you comment out the logging everything after it runs.
Here is what our log class looks like.
@xabbuh commented on GitHub (Jul 11, 2019):
Is it intended that you do not call the constructor of Monolog's
Loggerclass?@bigtunacan commented on GitHub (Jul 11, 2019):
I didn't create this; just the unlucky maintainer..., but it appears to do essentially what happens in the parent constructor in these lines.
I did try replacing that with a call to the parent constructor instead to see what would happen.
The behavior is the same both ways.
@xabbuh commented on GitHub (Jul 11, 2019):
I tried to reproduce that with this little script, but the code didn't error, but output the
TESTstring as expected: