• Resolved lowfrequency

    (@lowfrequency)


    Hi,

    I have checked my website with PHP Compatibility Checker plugin, and got next:

    FILE: .../wp-content/plugins/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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/timeline-express/lib/classes/usage-tracking/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)
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Can this problem be solved somehow? I want to upgrade to PHP7, but I need to make sure that nothing will break.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Code Parrots

    (@codeparrots)

    Hey @lowfrequency,

    We will take a look and make any of the necessary tweaks. We do most of our development on a PHP 7 environment and haven’t encountered any warnings.

    We can go ahead and install the comparability checker plugin and see what we can come up with.

    Thanks!

    Plugin Contributor Code Parrots

    (@codeparrots)

    Hi @lowfrequency,

    After some investigating it looks like those are just warnings, and are not actually going to break anything on your site. In fact, that is just the usage tracking code that is being run which is causing the error. As I mentioned earlier we do all of our testing on PHP 7.0 and later and have not encountered any warnings, or anything breaking – even with usage tracking on.

    To that note, if you’ve opted out of the tracking, that code will never be executed. Inside of the PHP Compatibility Checker plugin it states

    “This tool cannot detect unused code paths that might be used for backwards compatibility, potentially showing false positives.”

    Which is what’s going on here.

    Thanks for raising the issue here, we will continue to monitor the plugin for any compatibility issues moving forward!

    Plugin Contributor Code Parrots

    (@codeparrots)

    After some additional investigating and looking into updating the usage tracking dependencies, it looks like we’re going to go about re-writing this usage tracking class – so it is 100% internal and has no dependencies.

    This should cut down on the overall plugin size, and make things 100% compatible from PHP 5.6 and on.

    Thank you for the suggestion.

    Plugin Contributor Code Parrots

    (@codeparrots)

    Hi @lowfrequency,

    We have a new patch (1.4.0) coming out in the next day or so that will resolve this issue so that the compatibility tool will pass.

    Screenshot:
    https://cldup.com/yFr7T5Xah7.png

    We went ahead and re-wrote a large section of the plugin and significantly dropped the overall plugin size from 3.6mb to 2.4mb.

    We have a pull request, on Github, that we are going to review and get pushed out to the ww.wp.xz.cn repository. Feel free to follow along here: https://github.com/EvanHerman/timeline-express/pull/38

    Thanks again for bringing this up as it allowed us to rewrite and enhance a part of the plugin.

    • This reply was modified 9 years, 3 months ago by Code Parrots.
    • This reply was modified 9 years, 3 months ago by Code Parrots.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP7 compatibility’ is closed to new replies.