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

Monolog breaking change #299

Closed
ossigeno opened this issue Jun 12, 2022 · 2 comments
Closed

Monolog breaking change #299

ossigeno opened this issue Jun 12, 2022 · 2 comments
Labels

Comments

@ossigeno
Copy link

ossigeno commented Jun 12, 2022

Description


Monolog addRecord method signature has changed
Seldaek/monolog#1684 (comment)

This is causing exception in Mako:

ErrorException: Compile Error (64)
Declaration of mako\logger\Logger::addRecord(int $level, string $message, array $context = []): bool 
must be compatible with 
Monolog\Logger::addRecord(int $level, string $message, array $context = [], ?Monolog\DateTimeImmutable $datetime = null): bool

...

Steps to reproduce


Update Mako project to 8.1
and run composer update
...

Versions & Platform


What Version
PHP Version 8.1.6
Mako Version 8.1.0
OS macOS Monterey
Database MariaDb
@freost freost added the bug label Jun 12, 2022
@freost
Copy link
Member

freost commented Jun 12, 2022

A temporary solution is to lock the monolog version to 2.6.0 in your composer.json file. I'll make a permanent fix based on the outcome of the issue in the monolog repo.

@freost
Copy link
Member

freost commented Jun 12, 2022

Fixed by changing the Mako logger to a LoggerInterface decorator instead of extending the Monolog Logger.

@freost freost closed this as completed Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants