PHP 7 related errors

  • pseudo visitor
    Participant
    # 11 months, 2 weeks ago

    Hi there – we are seeing several PHP 7 related errors that we need cleaned up before migrating our environments.

    I’ll copy the errors below but the formatting might break in this form.

    Your immediate attention to this issue would be much appreciated as we have a deadline to meet for our migration

    FILE: …s/Code/http://www./wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/geolocation/class-wpsolr-option-geolocation.php
    ———————————————————————————————————————————–
    FOUND 1 ERROR AFFECTING 1 LINE
    ———————————————————————————————————————————–
    305 | ERROR | Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP
    | | 7.0. Use curly braces to remove ambiguity.
    ———————————————————————————————————————————–

    FILE: …/wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/geolocation/class-wpsolr-option-geolocation.php
    ———————————————————————————————————-
    FOUND 2 ERRORS AFFECTING 2 LINES
    ———————————————————————————————————-
    252 | ERROR | Indirect access to variables, properties and methods will be evaluated strictly in
    | | left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.
    307 | ERROR | Indirect access to variables, properties and methods will be evaluated strictly in
    | | left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.
    ———————————————————————————————————-

    FILE: …Projects/Code/http://www./wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ruflin/elastica/lib/Elastica/Query/Bool.php
    ———————————————————————————————————————————–
    FOUND 1 ERROR AFFECTING 1 LINE
    ———————————————————————————————————————————–
    16 | ERROR | ‘bool’ is a reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as
    | | part of a namespace (T_CLASS)
    ———————————————————————————————————————————–

    wpsolr
    Keymaster
    # 11 months, 2 weeks ago

    All our tests are performed with Selenium and PHP 7.0

    You should have no issue.

    pseudo visitor
    Participant
    # 11 months, 2 weeks ago

    There’s errors are on PHP 7.2

    wpsolr
    Keymaster
    # 11 months, 2 weeks ago

    These are not errors. Just sniffer reports.

    I cannot comply to all PHP sniffer audit tools. My only obligation as the plugin developer is to ensure that the plugin is actually tested. Which is done with 120 Selenium tests, on PHP 7.0

    I will of course try to check this report and fix what I can. But you can notice that some errors/warnings come from external libraries.

    Do you have an idea of the sniffer used for your report ?

    pseudo visitor
    Participant
    # 11 months, 2 weeks ago

    Thanks, we appreciate that.

    For reference we used the following libraries for testing:

    https://github.com/PHPCompatibility/PHPCompatibility
    https://wordpress.org/plugins/php-compatibility-checker/

    wpsolr
    Keymaster
    # 11 months, 2 weeks ago

    Next version WPSOLR 21.0 will be the first one certified PHP 7.2.

    The former errors were corrected either changing WPSOLR code, or updating libraries.

    https://wordpress.org/plugins/php-compatibility-checker/ is now included in the continuous integration (using command wp-cli “wp phpcompat 7.2 –scan=active”).

    wpsolr
    Keymaster
    # 11 months, 1 week ago

    WPSOLR 21.0 was released today. It includes the compatibility check to PHP 7.2.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.