Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.6 Check: Add notice and restrict future updates #2502

Merged
merged 7 commits into from Mar 26, 2019

Conversation

Projects
None yet
3 participants
@jom
Copy link
Member

commented Mar 25, 2019

This adds a notice for installs using Sensei with older versions of PHP (less than 5.6). In addition to adding the top admin notice on plugin and dashboard page, this also adds a small notice next to Sensei and official extensions on the plugin list. Updates are blocked through WP admin (not including manual uploading) for versions of Sensei and official extensions that will require a PHP version bump. This should still allow for future security releases if necessary/possible.

Testing

Build of PR:
woothemes-sensei-2cd38dc.zip

  • On instances with older versions of PHP, notice should appear at top of Plugins and Dashboard pages and next to the individual Sensei plugin + official extensions. PHP 5.6+ should not have notices.
  • With the below helpers, updates should not be shown on plugins page when using older versions of PHP.
  • On newer versions of PHP (5.6+), updates should still be offered when using below helpers.
  • Using WordPress 5.2 with older PHP should show standard update warning instead of notice with plugin meta. If you're using a pre-release, you may need to manually update $wp_version to be 5.2.0.

Helpers for Testing

(Note: Actual update won't work. Update zip packages are not included.)
Simulate updates to Sensei core:
sensei-update-core.zip

Simulate updates to Senesi Content Drip:
sensei-update-content-drip.zip

To Do

  • Update documentation link that shows up in plugin list.
  • Update notification text. (@donnapep)
  • Post-merge: PR to remove this functionality for release 2.0 merge.

@jom jom force-pushed the add/php-5-6-warning branch 2 times, most recently from 3423842 to 259240c Mar 25, 2019

@jom jom self-assigned this Mar 25, 2019

@jom jom requested review from alexsanford and donnapep Mar 25, 2019

@jom jom force-pushed the add/php-5-6-warning branch from 259240c to 99d21bf Mar 25, 2019

@jom jom added this to the 1.12.3 milestone Mar 25, 2019

@jom jom force-pushed the add/php-5-6-warning branch from 99d21bf to 3e76e11 Mar 25, 2019

@donnapep

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

Let's use this for the notice:
1  Screen Shot 2019-03-25 at 6 47 42 PM

Changed text - "To ensure that you continue to receive updates for Sensei, please upgrade to a newer version of PHP. "

And this for the update notice:
update-notice

Text - "Sensei 2.0 requires a newer version of PHP."

I'm not sure we need to link anywhere, as the notice pretty much says it all, but if you like we can link to https://senseilms.com/documentation/faq/#requirements.

jom added some commits Mar 26, 2019

@jom jom force-pushed the add/php-5-6-warning branch from 1d7cad2 to 28e5fe9 Mar 26, 2019

jom added some commits Mar 26, 2019

Remove WP 5.2 compat functionality
It won't work with less than PHP 5.6.30 anyway.
@alexsanford
Copy link
Contributor

left a comment

Code looks good. I did some quick testing on a single-site installation, and it seems to work well.

Show resolved Hide resolved includes/class-sensei.php Outdated

jom added some commits Mar 26, 2019

Bump priority for updater
Make it easier to test

@jom jom changed the base branch from master to version/1.12.x Mar 26, 2019

@alexsanford
Copy link
Contributor

left a comment

Did some testing on multisite. Seems to work well! 👍

@jom jom merged commit 0ef55d6 into version/1.12.x Mar 26, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jom jom deleted the add/php-5-6-warning branch Mar 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.