facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.17k stars 1.95k forks source link

[PHP 7.3] incompability issues #1176

Open PatricNox opened 4 years ago

PatricNox commented 4 years ago

php-graph-sdk version 5.7.0 is not fully compatible with servers running on PHP 7.2 or higher.

Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php

signe commented 4 years ago

McryptPseudoRandomStringGenerator is only loaded if mcrypt is available on the server.

Since mcrypt isn't available, McryptPseudoRandomStringGenerator::getPseudoRandomString() is never called and the const isn't referenced, therefore no PHP warnings are triggered.

Should it be removed? Sure. PHP 7.1 just passed its EOL in December 2019. Is it causing problems? No. The SDK works fine on 7.2 and above. You can even see in the tests for your PR, both 7.3 and 7.4 pass 100% of the tests.

If the developer intentionally overrides the PSRG and forces it to use McryptPSRG, then that's on them…

Since they haven't made a single change to this project in 18 months, I don't see it happening anytime soon.