Support » Plugin: Cloudflare » PHP 7 compatibility

  • Resolved metric99

    (@metric99)


    Hi there!

    We’ve checked your plugin using WP Engine PHP Compatibility Checker for PHP 7 compatibility, and are getting these errors/warnings:

    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorInterface.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
     3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /wp-content/plugins/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/SecurityUtil.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------
     16 | WARNING | Function mcrypt_create_iv() is deprecated since PHP 7.1; use OpenSSL instead
     16 | WARNING | Extension 'mcrypt' is deprecated since PHP 7.1 - use openssl (preferred) or pecl/mcrypt once available instead.
    ----------------------------------------------------------------------------------------------------------------------------------

    Do have planned fixes for these issues?
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Robert

    (@kinderrwindstreamnet)

    My site is also on WP Engine and have the same PHP 7 compatibility error report. CloudFlare plugin is the only stopping me from upgrading.

    Plugin Author icyapril

    (@icyapril)

    We are moving away from Guzzle (to WordPress’ in-built HTTP client) so this issue will be resolved in the next release.

    Despite similar advance reports from PHP compatibility checkers, I am running the Cloudflare plugin on multiple sites with PHP 7 and PHP 7.1 without any problem or any error messages being logged. So you might want to test on your own.

    I am on a different hosting platform, however, so cannot comment on WPEngine specific issues.

    I’m receiving the same errors from PHP compatibility checker plugin (WPE hosting).

    However, from other posts by the authors in this forum, it looks like there’s no issue in updating to PHP 7… I will wait for the author to comment here confirming that, so until then, proceed with caution 🙂

    • This reply was modified 2 years, 8 months ago by silico26.

    WordPress Cloudflare Plugin 3.2.0 is live fixing the issue. Could you give it a try.

    You can see the changelog

    https://en-gb.wordpress.org/plugins/cloudflare/changelog/

    Thanks

    Works perfectly – thanks for the quick reply/update.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP 7 compatibility’ is closed to new replies.