Skip to content

Don't set up queue if write key is not set#1

Open
Synchro wants to merge 1 commit into
MatanYadaev:support-php-8from
Synchro:3.5
Open

Don't set up queue if write key is not set#1
Synchro wants to merge 1 commit into
MatanYadaev:support-php-8from
Synchro:3.5

Conversation

@Synchro

@Synchro Synchro commented Sep 27, 2021

Copy link
Copy Markdown

Hi,

You've done a nice job cleaning up this fork for PHP 8, but it sounds like Graham isn't too bothered about merging or maintaining it. I've already made this PR against his repo, but I figured it might do better bundled in with your changes, so i thought I'd post it here too.

It simply moves the initial queue setup inside the key check, which means that the queue cleanup functions don't get called on shutdown if you have no key. If you don't do this, and you don't have a key set, it will throw an error at the end of every request. If you don't have a key set, it then just fails quietly – which is very useful for dev or staging envs – in my case this issue was causing 32,000 exceptions/day on my staging server before I figured it out!

@Synchro

Synchro commented Sep 27, 2021

Copy link
Copy Markdown
Author

FYI, I've also done a major cleanup of Segment's upstream analytics-php library which I'm intending to PR to them - extra sets of eyes appreciated!

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.

1 participant