uncatcrea / wp-appkit

WP-AppKit WordPress plugin (create mobile apps connected to WordPress)
http://uncategorized-creations.com/
195 stars 65 forks source link

PHP 7 Compatibility for Plugin #259

Closed WillCoffin closed 8 years ago

WillCoffin commented 8 years ago

Just ran a php7 compatibility check on all of my plugins and this one raised a bunch of red flags.

This is the tool I used: https://wordpress.org/plugins/php-compatibility-checker/

Wanted to get this on the roadmap so everything is a future-proof as possible. My host is moving to PHP7 in the fall and there are supposed to be significant speed improvements!

Here is the output:

FILE: .../wp-content/plugins/wp-appkit-master/wp-appkit/lib/components/components-utils.php

FOUND 1 ERROR AFFECTING 1 LINE

8 | ERROR | Parameter shadowing super global ($_post) causes fatal error since PHP 5.4

FILE: .../wp-content/plugins/wp-appkit-master/wp-appkit/lib/components/components-types.php

FOUND 2 ERRORS AFFECTING 2 LINES

19 | ERROR | Parameter shadowing super global ($globals) causes fatal error since PHP 5.4

69 | ERROR | Parameter shadowing super global ($globals) causes fatal error since PHP 5.4

Thanks for all your work on this!

blupu commented 8 years ago

Hi Will, thank you to raise the issue - we'll look into that ASAP.

WillCoffin commented 8 years ago

Great! Thanks for all the hard work :)

blupu commented 8 years ago

Hi Will, good news: you're safe with WP-AppKit and PHP7. We were afraid that even we've thoroughly tested WP-AppKit with all PHP version, we may have missed serious bugs. But it appears that it is on the side of the PHP Compatibility Checker. This plugin doesn't take in account that PHP is case sensitive and this why it raises errors for WP-AppKit.

I am curious: did you release apps using WP-AppKit?

mleroi commented 8 years ago

The corresponding issue on PHP Compatibility Checker plugin's forum: https://wordpress.org/support/topic/case-insensitive-parsing-leading-to-parameter-shadowing-super-global-error/

And on PHPCompatibility repo: https://github.com/wimg/PHPCompatibility/issues/214