monolog icon indicating copy to clipboard operation
monolog copied to clipboard

Cannot redeclare function issues

Open hcker2000 opened this issue 3 years ago • 0 comments

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

image

hcker2000 avatar Aug 05 '22 14:08 hcker2000

Could you provide the code of your monolog configuration and the file which creates the error?

mimmi20 avatar Aug 17 '22 05:08 mimmi20

That really doesn't seem related to monolog.. but if you think it is then I'll need a lot more details.

Seldaek avatar Aug 17 '22 21:08 Seldaek

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: @.***>

hcker2000 avatar Aug 17 '22 22:08 hcker2000

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: @.***>

hcker2000 avatar Aug 17 '22 22:08 hcker2000

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.

Seldaek avatar Aug 20 '22 12:08 Seldaek

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.

hcker2000 avatar Aug 20 '22 12:08 hcker2000

No worries, glad it's fixed.

Seldaek avatar Aug 20 '22 13:08 Seldaek