Support » Plugin: WP Mail SMTP by WPForms » PHP 7.2 compatibility….

  • Resolved hometownstructures

    (@hometowntrailers)



    Can you please confirm/deny the PHP 7.2 compatibility? I’m receiving this error report on a PHP 7.2 compatibility test:

    FILE: /nas/content/live/hometowntraile/wp-content/plugins/wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php
    —————————————————————————————
    FOUND 5 ERRORS AFFECTING 2 LINES
    —————————————————————————————
    65 | ERROR | Extension ‘mcrypt’ is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    65 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    104 | ERROR | Extension ‘mcrypt’ is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    104 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    104 | ERROR | The constant “MCRYPT_DEV_URANDOM” is deprecated since PHP 7.1 and removed since PHP 7.2
    —————————————————————————————

    FILE: /nas/content/live/hometowntraile/wp-content/plugins/wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
    —————————————————————————————FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————
    10 | WARNING | INI directive ‘mbstring.func_overload’ is deprecated since PHP 7.2
    —————————————————————————————

    FILE: /nas/content/live/hometowntraile/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/promises/src/functions.php
    —————————————————————————————
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    —————————————————————————————
    222 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
    257 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
    313 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
    —————————————————————————————

    Please reply. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • I can tell you that at least some of those are completely bogus. For example, the ones relating to phpseclib. This plugin is using a fairly new version of phpseclib it looks like:

    https://plugins.trac.wordpress.org/browser/wp-mail-smtp/tags/1.2.5/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php

    https://github.com/phpseclib/phpseclib/issues/1229#issuecomment-351066079 explains why it’s not an issue.

    Static code analyzers are not 100% accurate and you should take their findings with a grain of salt.

    Plugin Author Slava Abakumov

    (@slaffik)

    Thanks, @terrafrost. You are correct. phpseclib library version is just several months old.

    @hometowntrailers, with that, I’m resolving this thread.

    Same issue testing PHP 7.1 compatibility:

    FILE: /home/ayudawp7/public_html/wp-content/plugins/wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------
      69 | WARNING | Extension 'mcrypt' is deprecated since PHP 7.1 - use openssl (preferred) or pecl/mcrypt once available instead.
      69 | WARNING | Function mcrypt_create_iv() is deprecated since PHP 7.1; use OpenSSL instead
     108 | WARNING | Extension 'mcrypt' is deprecated since PHP 7.1 - use openssl (preferred) or pecl/mcrypt once available instead.
     108 | WARNING | Function mcrypt_create_iv() is deprecated since PHP 7.1; use OpenSSL instead
    ---------------------------------------------------------------------------------------------------------------------------------
    digitwebtools

    (@digitwebtools)

    Dear WPForms,

    You say:

    Requires PHP Version: 5.3

    Is this plug-in compatible with PHP 7.x?

    After running the code against WP Compatibility Checker or Code Sniffer with the PHPCompatibility sniffs, it generates some warnings:

    
    FILE: ...lugins/wp-mail-smtp/vendor/guzzlehttp/promises/src/functions.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ----------------------------------------------------------------------
     222 | WARNING | Function each() is deprecated since PHP 7.2; Use a
         |         | foreach loop instead
     257 | WARNING | Function each() is deprecated since PHP 7.2; Use a
         |         | foreach loop instead
     313 | WARNING | Function each() is deprecated since PHP 7.2; Use a
         |         | foreach loop instead
    ----------------------------------------------------------------------
    
    FILE: .../wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     10 | WARNING | INI directive 'mbstring.func_overload' is deprecated
        |         | since PHP 7.2
    ----------------------------------------------------------------------
    
    FILE: ...-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php
    ----------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
      69 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and
         |       | removed since PHP 7.2; Use openssl (preferred) or
         |       | pecl/mcrypt once available instead
      69 | ERROR | Function mcrypt_create_iv() is deprecated since PHP
         |       | 7.1 and removed since PHP 7.2; Use random_bytes() or
         |       | OpenSSL instead
     108 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and
         |       | removed since PHP 7.2; Use openssl (preferred) or
         |       | pecl/mcrypt once available instead
     108 | ERROR | Function mcrypt_create_iv() is deprecated since PHP
         |       | 7.1 and removed since PHP 7.2; Use random_bytes() or
         |       | OpenSSL instead
     108 | ERROR | The constant "MCRYPT_DEV_URANDOM" is deprecated since
         |       | PHP 7.1 and removed since PHP 7.2
    ----------------------------------------------------------------------
    

    Same with Phan

    
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:73 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:81 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:95 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:96 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Model.php:105 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Model.php:107 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    

    Do you know if a review / fix is planned?

    Thanks a lot,

    Best regards.

    Alexandre

    Plugin Author Slava Abakumov

    (@slaffik)

    WP Mail SMTP plugin is compatible with PHP 7.0, 7.1 and 7.2 and works without issues on those versions.

    digitwebtools

    (@digitwebtools)

    Thanks Slaffik for the confirmation.

    Best regards,

    Alexandre 8)

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.