-
Notifications
You must be signed in to change notification settings - Fork 38
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
Monolog and PHP 8 updates #40
base: main
Are you sure you want to change the base?
Conversation
"brianium/paratest": "^3.1", | ||
"monolog/monolog": "^2.0" | ||
"squizlabs/php_codesniffer": "^3.7", | ||
"brianium/paratest": "^6.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These updates are required to be able to run tests with PHP 8.
"monolog/monolog": "^2.0" | ||
"squizlabs/php_codesniffer": "^3.7", | ||
"brianium/paratest": "^6.6", | ||
"monolog/monolog": "^2.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although still compatible with monolog < 2.5, ^2.5 is required for tests
❕ Build Aborted
Expand to view the summary
Build stats
Steps errors
Expand to view the steps failures
|
Maybe you can include diff from main...paveljanda:ecs-logging-php:main? (native PHP types) |
run docs-build |
This update fixes an issue working with monolog 2.5 and above, where the IntrospectionProcessor added a
callType
field to its output. Since theElasticCommonSchemaFormatter
does not know about this field, it gets added as a top level key instead of withinlog.origin
even when$useLogOriginFromContext
is set. This can be demonstrated by simply checking out the main branch of this repo and runningcomposer install && composer test
.This fixes the issue by adding
callType
to the list of known origin keys and also uses it (if available, so will still work with monolog < 2.5) within thelog.origin.function
field. E.g.MyClass::myFunction
orMyClass->myFunction
.As a minor additional change it also marks compatibility with
psr/log
2.x and 3.x.