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.18k stars 1.96k forks source link

Not Compatible with PHP 7.2 #1077

Closed UVLabs closed 5 years ago

UVLabs commented 6 years ago

---
FOUND 3 ERRORS AFFECTING 1 LINE
---
 57 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
 57 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
 57 | ERROR | The constant "MCRYPT_DEV_URANDOM" is deprecated since PHP 7.1 and removed since PHP 7.2```
pako-pl commented 6 years ago

We use php-graph-sdk on PHP 7.2.x without any issues. The functions / constants you mentioned are only used on older PHP versions (like 5.x), for example:

// Check for PHP 7's CSPRNG first to keep mcrypt deprecation messages from appearing in PHP 7.1.
        if (function_exists('random_bytes')) {
            return new RandomBytesPseudoRandomStringGenerator();
        }

        // Since openssl_random_pseudo_bytes() can sometimes return non-cryptographically
        // secure pseudo-random strings (in rare cases), we check for mcrypt_create_iv() next.
        if (function_exists('mcrypt_create_iv')) {
            return new McryptPseudoRandomStringGenerator();
        }
yguedidi commented 5 years ago

Thanks @UVLabs for your concern about PHP 7.2! But as @pako-pl said, it's optional, so I'm closing this.