Support » Plugin: Loco Translate » PHP 7 compatibility

  • Resolved cpapadop

    (@cpapadop)


    Hello,

    I checked the PHP7 compatibility with “php compatibility checker” plugin and got some warnings and errors.

    Name: Loco Translate

    FILE: …/wp-content/plugins/loco-translate/src/mvc/FileParams.php
    ———————————————————————————————
    FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
    ———————————————————————————————
    99 | WARNING | Method name “Loco_mvc_FileParams::__name” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    107 | WARNING | Method name “Loco_mvc_FileParams::__path” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    115 | WARNING | Method name “Loco_mvc_FileParams::__relpath” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    126 | WARNING | Method name “Loco_mvc_FileParams::__reltime” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    145 | WARNING | Method name “Loco_mvc_FileParams::__bytes” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    153 | WARNING | Method name “Loco_mvc_FileParams::__size” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    162 | WARNING | Method name “Loco_mvc_FileParams::__imode” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    172 | WARNING | Method name “Loco_mvc_FileParams::__smode” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    182 | WARNING | Method name “Loco_mvc_FileParams::__owner” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    194 | WARNING | Method name “Loco_mvc_FileParams::__group” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    ———————————————————————————————

    FILE: …/wp-content/plugins/loco-translate/old/lib/loco-boot.php
    ———————————————————————————————FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————
    61 | WARNING | Method name “Loco::__file” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    ———————————————————————————————

    FILE: …/wp-content/plugins/loco-translate/lib/compiled/gettext.php
    ——————————————————————————————
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ——————————————————————————————
    1 | WARNING | File has mixed line endings; this may cause incorrect results
    ——————————————————————————————

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Thanks for this.

    I will fix the prefix issue. Easy one.

    The last one is interesting as this file is post-processed for PHP 5.2 compatibility and has caused some mysterious problems for some people. Perhaps this is a clue.

    Thread Starter cpapadop

    (@cpapadop)

    Thank you!

    Plugin Author Tim W

    (@timwhitlock)

    The development version has a fix for the reserved function name prefixing, so I’m marking this ticket as resolved.

    Re the line endings issue: I looked at the compatibility checker code and I think this is a false positive because the processed file has unescaped line breaks in string literals. These don’t actually count as line endings in the code, but I’m going to look into fixing them anyway. That compiled file is a mess and is causing other problems. I’ll solve it separately from this.

    Thanks for your input.

    • This reply was modified 4 years, 6 months ago by Tim W.

    Hey!

    Thanks for your work at the plugin.

    Looking forward to the plugin update to get the PHP7 compatibility in the stable version.
    Any release schedule?

    Greetings
    derRALF

    Plugin Author Tim W

    (@timwhitlock)

    Was going to be yesterday. could be later today, but more likely tomorrow.

    Plugin Author Tim W

    (@timwhitlock)

    2.0.8 is live

    Hey!

    No more warnings with version: 2.0.9
    Thanks.

    Greetings
    derRALF

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