pusher / pusher-http-php

PHP library for interacting with the Pusher Channels HTTP API
https://pusher.com/docs/server_api_guide
1.42k stars 309 forks source link

Fatal error: Cannot declare class ParagonIE_Sodium_Compat #314

Closed cggit closed 2 years ago

cggit commented 2 years ago

PHP 7.3 WordPress 5.8.1 (also tested older version) Composer 2.0.6 pusher-http-php 3.4.1 -> 7.0

When I update to pusher-http-php ^7.0 and load a page I get a "Fatal error: Cannot declare class ParagonIE_Sodium_Compat, because the name is already in use".

WordPress has its own copy of this class loaded very early in /wp-settings.php but there is no conflict before updating to 7.0.

I did not have this error with pusher-http-php ^3.4.1

In both class files there is: if (class_exists('ParagonIE_Sodium_Compat', false)) { return; }

Can someone point me in the right direction?

Update: Installing the PHP Extension php-libsodium on the server got around the issue but it would be nice to not need that.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you'd like this issue to stay open please leave a comment indicating how this issue is affecting you. Thank you.