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

Bump monolog/monolog from 2.9.1 to 3.3.1 #245

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 7, 2023

Bumps monolog/monolog from 2.9.1 to 3.3.1.

Release notes

Sourced from monolog/monolog's releases.

3.3.1

  • Fixed Logger not being serializable anymore (#1792)

3.3.0

  • Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748)
  • Added ClosureContextProcessor to allow delaying the creation of context data by setting a Closure in context which is called when the log record is used (#1745)
  • Added an ElasticsearchHandler option to set the op_type to create instead of the default index (#1766)
  • Added support for enum context values in PsrLogMessageProcessor (#1773)
  • Added graylog2/gelf-php 2.x support (#1747)
  • Improved BrowserConsoleHandler logging to use more appropriate methods than just console.log in the browser (#1739)
  • Fixed GitProcessor not filtering correctly based on Level (#1749)
  • Fixed WhatFailureGroupHandler not catching errors happening inside close() (#1791)
  • Fixed datetime field in GoogleCloudLoggingFormatter (#1758)
  • Fixed infinite loop detection within Fibers (#1753)
  • Fixed AmqpHandler->setExtraAttributes not working with buffering handler wrappers (#1781)

3.2.0

  • Deprecated CubeHandler and PHPConsoleHandler as both projects are abandoned and those should not be used anymore (#1734)
  • Marked Logger @final as it should not be extended, prefer composition or talk to us if you are missing something
  • Added RFC 5424 level (7 to 0) support to Logger::log and Logger::addRecord to increase interoperability (#1723)
  • Added SyslogFormatter to output syslog-like files which can be consumed by tools like lnav (#1689)
  • Added support for __toString for objects which are not json serializable in JsonFormatter (#1733)
  • Added GoogleCloudLoggingFormatter (#1719)
  • Added support for Predis 2.x (#1732)
  • Added AmqpHandler->setExtraAttributes to allow configuring attributes when using an AMQPExchange (#1724)
  • Fixed serialization/unserialization of handlers to make sure private properties are included (#1727)
  • Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing \n or \r sequences (#1720)
  • Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726)
  • Fixed PHP 8.2 deprecation warnings (#1722)
  • Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678)

3.1.0

  • Added $datetime parameter to Logger::addRecord as low level API to allow logging into the past or future (#1682)
  • Added Logger::useLoggingLoopDetection to allow disabling cyclic logging detection in concurrent frameworks (#1681)
  • Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670)
  • Fixed v2/v3 interop issue by removing the need for a return type in ProcessorInterface (#1680)
  • Marked the reusable Monolog\Test\TestCase class as @internal to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)
  • Fixed RotatingFileHandler issue when the date format contained slashes (#1671)

3.0.0

This is mostly a cleanup release offering stronger type guarantees for integrators with the array->object/enum changes, but there is no big new feature for end users.

See UPGRADE notes for details on all breaking changes especially if you are extending/implementing Monolog classes/interfaces.

Noteworthy BC Breaks:

  • The minimum supported PHP version is now 8.1.0.
  • Log records have been converted from an array to a Monolog\LogRecord object with public (and mostly readonly) properties. e.g. instead of doing

... (truncated)

Changelog

Sourced from monolog/monolog's changelog.

3.3.1 (2023-02-06)

  • Fixed Logger not being serializable anymore (#1792)

3.3.0 (2023-02-06)

  • Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748)
  • Added ClosureContextProcessor to allow delaying the creation of context data by setting a Closure in context which is called when the log record is used (#1745)
  • Added an ElasticsearchHandler option to set the op_type to create instead of the default index (#1766)
  • Added support for enum context values in PsrLogMessageProcessor (#1773)
  • Added graylog2/gelf-php 2.x support (#1747)
  • Improved BrowserConsoleHandler logging to use more appropriate methods than just console.log in the browser (#1739)
  • Fixed GitProcessor not filtering correctly based on Level (#1749)
  • Fixed WhatFailureGroupHandler not catching errors happening inside close() (#1791)
  • Fixed datetime field in GoogleCloudLoggingFormatter (#1758)
  • Fixed infinite loop detection within Fibers (#1753)
  • Fixed AmqpHandler->setExtraAttributes not working with buffering handler wrappers (#1781)

3.2.0 (2022-07-24)

  • Deprecated CubeHandler and PHPConsoleHandler as both projects are abandoned and those should not be used anymore (#1734)
  • Marked Logger @final as it should not be extended, prefer composition or talk to us if you are missing something
  • Added RFC 5424 level (7 to 0) support to Logger::log and Logger::addRecord to increase interoperability (#1723)
  • Added SyslogFormatter to output syslog-like files which can be consumed by tools like lnav (#1689)
  • Added support for __toString for objects which are not json serializable in JsonFormatter (#1733)
  • Added GoogleCloudLoggingFormatter (#1719)
  • Added support for Predis 2.x (#1732)
  • Added AmqpHandler->setExtraAttributes to allow configuring attributes when using an AMQPExchange (#1724)
  • Fixed serialization/unserialization of handlers to make sure private properties are included (#1727)
  • Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing \n or \r sequences (#1720)
  • Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726)
  • Fixed PHP 8.2 deprecation warnings (#1722)
  • Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678)

3.1.0 (2022-06-09)

  • Added $datetime parameter to Logger::addRecord as low level API to allow logging into the past or future (#1682)
  • Added Logger::useLoggingLoopDetection to allow disabling cyclic logging detection in concurrent frameworks (#1681)
  • Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670)
  • Fixed interop issue by removing the need for a return type in ProcessorInterface (#1680)
  • Marked the reusable Monolog\Test\TestCase class as @internal to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)
  • Fixed RotatingFileHandler issue when the date format contained slashes (#1671)

3.0.0 (2022-05-10)

Changes from RC1

  • The Monolog\LevelName enum does not exist anymore, use Monolog\Level->getName() instead.

3.0.0-RC1 (2022-05-08)

... (truncated)

Upgrade guide

Sourced from monolog/monolog's upgrade guide.

3.0.0

Overall / notable changes:

  • The minimum supported PHP version is now 8.1.0.
  • Monolog\Logger::API can be used to distinguish between a Monolog 3, 2 or 1 install when writing integration code.
  • Log records have been converted from an array to a Monolog\LogRecord object with public (and mostly readonly) properties. e.g. instead of doing $record['context'] use $record->context. In formatters or handlers if you rather need an array to work with you can use $record->toArray() to get back a Monolog 1/2 style record array. This will contain the enum values instead of enum cases in the level and level_name keys to be more backwards compatible and use simpler data types.
  • FormatterInterface, HandlerInterface, ProcessorInterface, etc. changed to contain LogRecord $record instead of array $record parameter types. If you want to support multiple Monolog versions this should be possible by type-hinting nothing, or array|LogRecord if you support PHP 8.0+. You can then code against the $record using Monolog 2 style as LogRecord implements ArrayAccess for BC. The interfaces do not require a LogRecord return type even where it would be applicable, but if you only support Monolog 3 in integration code I would recommend you use LogRecord return types wherever fitting to ensure forward compatibility as it may be added in Monolog 4.
  • Log levels are now stored as an enum Monolog\Level
  • All properties have had types added, which may require you to do so as well if you extended a Monolog class and declared the same property.

Logger

  • Logger::DEBUG, Logger::ERROR, etc. are now deprecated in favor of the Level enum. e.g. instead of Logger::WARNING use Level::Warning if you need to pass the enum case to Monolog or one of its handlers, or Level::Warning->value if you need the integer value equal to what Logger::WARNING was giving you.
  • Logger::$levels has been removed.
  • Logger::getLevels has been removed in favor of Monolog\Level::VALUES or Monolog\Level::cases().
  • setExceptionHandler now requires a Closure instance and not just any callable.

HtmlFormatter

  • If you redefined colors in the $logLevels property you must now override the getLevelColor method instead.

NormalizerFormatter

  • A new normalizeRecord method is available as an extension point which is called only when converting the LogRecord to an array. You may need this if you overrode format previously as parent::format now needs to receive a LogRecord still so you cannot modify it before.

AbstractSyslogHandler

  • If you redefined syslog levels in the $logLevels property you must now override the toSyslogPriority method instead.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Apr 7, 2023
@dependabot dependabot bot force-pushed the dependabot/composer/monolog/monolog-3.3.1 branch from 2f78656 to 33892e0 Compare April 12, 2023 06:10
Bumps [monolog/monolog](https://github.com/Seldaek/monolog) from 2.9.1 to 3.3.1.
- [Release notes](https://github.com/Seldaek/monolog/releases)
- [Changelog](https://github.com/Seldaek/monolog/blob/main/CHANGELOG.md)
- [Upgrade guide](https://github.com/Seldaek/monolog/blob/main/UPGRADE.md)
- [Commits](Seldaek/monolog@2.9.1...3.3.1)

---
updated-dependencies:
- dependency-name: monolog/monolog
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/composer/monolog/monolog-3.3.1 branch from 33892e0 to 0e1e840 Compare April 12, 2023 06:10
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 22, 2023

A newer version of monolog/monolog exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant