• Resolved brycef

    (@brycef)


    Hi, we are testing our sites for PHP 7 compatibility and your plugin yields these errors:

    FILE: /wp-content/plugins/download-monitor/src/Polyfill/DateTimeImmutable/DateTimeImmutable.php
    ——————————————————————————————————————-
    FOUND 1 ERROR AFFECTING 1 LINE
    ——————————————————————————————————————-
    16 | ERROR | The interface DateTimeInterface is intended for type hints only and is not implementable.
    ——————————————————————————————————————-

    FILE: /wp-content/plugins/download-monitor/src/DownloadHandler.php
    ———————————————————————————————————–
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ———————————————————————————————————–
    604 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4
    609 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since PHP 7.0
    ———————————————————————————————————–

    FILE: /wp-content/plugins/download-monitor/src/Libs/uaparser/lib/spyc-0.5/spyc.php
    —————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    —————————————————————————————————————————————————-
    393 | WARNING | Method name “Spyc::__load” is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
    398 | WARNING | Method name “Spyc::__loadString” is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
    —————————————————————————————————————————————————-

    Can you help address them?

Viewing 1 replies (of 1 total)
  • Plugin Contributor Barry Kooij

    (@barrykooij)

    Hey @brycef ,

    Thanks for your patience and your report. Most of these are false negatives, meaning your checker will falsely warn you about or code.

    The first error is about fallback / polyfill code. This is code we only load if your PHP version is old so we can add functionality you normally wouldn’t have yet. If you are on PHP 7+, this code will never load. These checkers, unfortunately, do not check this, they simply search the files for certain lines and when found, show a warning.

    The last 2 warnings are regarding an external library we included in the plugin. We will have to look into the possibility of updating the library or replacing it.

    For your information, we develop and run our plugins on PHP 7.2 and they work great on them.

    Kind Regards,

    Barry Kooij

Viewing 1 replies (of 1 total)
  • The topic ‘PHP 7 Compatibility’ is closed to new replies.