Support » Plugin: Authorizer » Authorizer incompatible with PHP7

  • Resolved webelaine

    (@wpgirl369)


    Our host is upgrading our server to enable PHP7, so we ran compatibility checks with the PHP Compatibility Checker plugin (https://wordpress.org/plugins/php-compatibility-checker/) to make sure our sites will function properly after the upgrade.

    Unfortunately, Authorizer throws the following warning about quite a few files:

    WARNING | File has mixed line endings; this may cause incorrect results

    We are happy with Authorizer and would like to keep using it, but we also want to be able to use PHP7. It seems like a fairly simple warning to fix – is there a way I could help, like updating the line endings and sending a Git pull request?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Paul Ryan

    (@figureone)

    We already run Authorizer in production with php7 (on Ubuntu 16.04.1 servers). Haven’t tested it on Windows servers yet, but I doubt mixed line endings would cause any problems.

    If you’d like to clean up line endings, pull requests are appreciated!
    https://github.com/uhm-coe/authorizer

    webelaine

    (@wpgirl369)

    Hi Paul – I’ll happily send in a pull request. One question first – the plugin has an “inc” folder on my production site, but it’s not included in the Git repo you linked to. Some of the reported problems are in that “inc” folder. Should I just send in a pull request for the files I can access, or is there a way to update those too so that all of the warnings can be removed?

    Plugin Author Paul Ryan

    (@figureone)

    Thanks!

    “inc” folder was renamed to “vendor” in version 2.6.4, released Jan 6:
    https://github.com/uhm-coe/authorizer/commit/2345d0d04c9851fd0e04fb8d9bb9587710c01905

    Latest commit in master is functional (there’s a few fixes in there that will make it into the upcoming version 2.6.6), so please base the pull request off that if possible.

    It makes sense that the inc/vendor folder has the mixed line endings, since those are external libraries from others (with different development environments). I have no problem standardizing them though!

    webelaine

    (@wpgirl369)

    Aha, that makes sense. We were running 2.6.5 but our server permissions must have prevented /inc/ from being renamed with the update. I sent over a pull request – I’m a little new to Git but hopefully I set everything up correctly. With updated line breaks, all the code passes. Thanks again for an awesome plugin and your willingness to update the line breaks to prevent those warnings.

    Plugin Author Paul Ryan

    (@figureone)

    Looks great!

    I ended up switching the line endings to Unix (CR) instead of Windows (CR-LF) because it resulted in fewer changes (57 changes instead of 7,282 changes) and an easier to read diff:

    https://github.com/uhm-coe/authorizer/commit/aca49f75c0e73e057a649a7d28309a86fca0988e
    vs.
    https://github.com/uhm-coe/authorizer/pull/19/commits/79c057477a6cbb56fab86cb52e763ca53d60c92a

    Your fix will make it into the next release (2.6.6), due out soon. Thanks for you contribution!

    Plugin Author Paul Ryan

    (@figureone)

    Version 2.6.6 is out with this fix. Thanks!
    https://wordpress.org/plugins/authorizer/changelog/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Authorizer incompatible with PHP7’ is closed to new replies.