[GH-ISSUE #1744] Cannot redeclare function issues #733

Closed
opened 2026-03-04 02:17:30 +03:00 by kerem · 7 comments
Owner

Originally created by @hcker2000 on GitHub (Aug 5, 2022).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1744

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

Originally created by @hcker2000 on GitHub (Aug 5, 2022). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1744 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](https://user-images.githubusercontent.com/759902/183099914-101f8bab-1b51-46a3-9f14-158645492d35.png)
kerem 2026-03-04 02:17:30 +03:00
  • closed this issue
  • added the
    Support
    label
Author
Owner

@mimmi20 commented on GitHub (Aug 17, 2022):

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

<!-- gh-comment-id:1217492627 --> @mimmi20 commented on GitHub (Aug 17, 2022): Could you provide the code of your monolog configuration and the file which creates the error?
Author
Owner

@Seldaek commented on GitHub (Aug 17, 2022):

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

<!-- gh-comment-id:1218509813 --> @Seldaek commented on GitHub (Aug 17, 2022): That really doesn't seem related to monolog.. but if you think it is then I'll need a lot more details.
Author
Owner

@hcker2000 commented on GitHub (Aug 17, 2022):

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

<!-- gh-comment-id:1218574984 --> @hcker2000 commented on GitHub (Aug 17, 2022): 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: > ***@***.***> >
Author
Owner

@hcker2000 commented on GitHub (Aug 17, 2022):

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

<!-- gh-comment-id:1218577781 --> @hcker2000 commented on GitHub (Aug 17, 2022): 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: > ***@***.***> >
Author
Owner

@Seldaek commented on GitHub (Aug 20, 2022):

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.

<!-- gh-comment-id:1221305770 --> @Seldaek commented on GitHub (Aug 20, 2022): 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.
Author
Owner

@hcker2000 commented on GitHub (Aug 20, 2022):

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.

<!-- gh-comment-id:1221308616 --> @hcker2000 commented on GitHub (Aug 20, 2022): 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.
Author
Owner

@Seldaek commented on GitHub (Aug 20, 2022):

No worries, glad it's fixed.

<!-- gh-comment-id:1221314177 --> @Seldaek commented on GitHub (Aug 20, 2022): No worries, glad it's fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#733
No description provided.