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

Change AdaptiveHandler::write() argument type and update monolog/monolog requirement #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mathieuimbert
Copy link

@mathieuimbert mathieuimbert commented Jan 9, 2023

When using the newrelic bundle on Symfony 6.2 and PHP 8.1 I get the following error:

Fatal error: Declaration of Ekino\NewRelicBundle\Logging\AdaptiveHandler::write(array $record): void must be compatible with Monolog\Handler\NewRelicHandler::write(Monolog\LogRecord $record): void in /var/www/html/vendor/ekino/newrelic-bundle/Logging/AdaptiveHandler.php on line 31

Since monolog/monolog v3.0.0 the argument type was changed from array to LogRecord (see: https://github.com/Seldaek/monolog/blame/main/src/Monolog/Handler/NewRelicHandler.php#L60).

I updated the argument type, as well as the required version of monolog/monolog since the need to be compatible, it requires version v3.0.0.

Note I also reviewed that PR #281 but I introduce less changes in the hope to fix that specific issue.

@mathieuimbert mathieuimbert changed the title fix: change AdaptiveHandler::write() argument type and update monolog/monolog requirement Change AdaptiveHandler::write() argument type and update monolog/monolog requirement Jan 9, 2023
@Seldar
Copy link

Seldar commented Apr 5, 2024

Is this library abandoned? I have exact same issue

@mathieuimbert
Copy link
Author

@Seldar looks like it. I just ended up removing it from my projects, as it is not required for newrelic to work. and it's pretty easy to integrate it yourself if you need to ignore / rename some routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants