monolog
monolog copied to clipboard
Cannot redeclare function issues
Version 2.8.0
Once we upgraded to 2.8.0 all inline functions are throwing the following error:
Cannot redeclare banana() (previously declared in /var/www/html/mysite.com/App/Views/Agency/Info/Agency.php:362)
Function name does not matter. You can change them to anything and they throw that error

Could you provide the code of your monolog configuration and the file which creates the error?
That really doesn't seem related to monolog.. but if you think it is then I'll need a lot more details.
I can get you whatever info you need. All I know at this point is that I upgraded to 2.8 via composer and everything started throwing those errors.
It was the only change I made at the time. It also goes away as soon as I downgrade to 2.7 it goes away.
On Wed, Aug 17, 2022, 5:32 PM Jordi Boggiano @.***> wrote:
That really doesn't seem related to monolog.. but if you think it is then I'll need a lot more details.
— Reply to this email directly, view it on GitHub https://github.com/Seldaek/monolog/issues/1744#issuecomment-1218509813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZQXQQJK6RGDNCQWQ4ABLVZVK53ANCNFSM55WJVO5A . You are receiving this because you authored the thread.Message ID: @.***>
Yup I can get that to you. A copy of my composer.json may also help
On Wed, Aug 17, 2022, 1:53 AM Thomas Müller @.***> wrote:
Could you provide the code of your monolog configuration and the file which creates the error?
— Reply to this email directly, view it on GitHub https://github.com/Seldaek/monolog/issues/1744#issuecomment-1217492627, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZQXUS2H4CFASB6LX7GRDVZR44VANCNFSM55WJVO5A . You are receiving this because you authored the thread.Message ID: @.***>
OK if you are sure it is coming from Monolog 2.8 let's look at changes.. https://github.com/Seldaek/monolog/releases/tag/2.8.0
The only two things I could imagine causing weird side effects are: https://github.com/Seldaek/monolog/issues/1733 and https://github.com/Seldaek/monolog/issues/1727
Do you have any context entries with __toString, and do you serialize/deserialize the logger/handlers? If not I don't see what could possibly change here.
So I finally had some time to try and get you the files. So I updated my setup back to 2.8.0 and everything is working just fine now so I have no idea if this was some kind of caching issue or if composer got a partial file or something.
Sorry for the false alarm.
No worries, glad it's fixed.