10up / ads-txt

Ads.txt Manager for WordPress: Manage your ads.txt and app-ads.txt files in the WordPress dashboard
https://wordpress.org/plugins/ads-txt/
GNU General Public License v2.0
57 stars 23 forks source link

Add PHP version check for plugin. #149

Closed rahulsprajapati closed 8 months ago

rahulsprajapati commented 1 year ago

Description of the Change

Add minimum version check for the plugin before loading it. This will ensure plugin update doesn't break the site that don't match our minimum PHP version.

image

Closes #148

How to test the Change

  1. Setup a WordPress environment running PHP 7.3
  2. Install ads.txt plugin by downloading it with this feature branch.
  3. Verify that plugin functionality doesn't load and you see an admin error message for php version. ( refer above screenshot in Description )

Changelog Entry

Fixed - Better error handling for environments that don't match our minimum PHP version

Credits

Props @dkotter, @rahulsprajapati

Checklist:

jeffpaul commented 11 months ago

@peterwilsoncc looking for review here, thanks!

frankiebordone commented 8 months ago

@peterwilsoncc Your previous feedback items on this PR have been addressed! Note: Some E2E related jobs were not successful as per https://github.com/10up/ads-txt/actions/runs/7477337138 - do we typically ignore these?

CC: @jeffpaul

dkotter commented 8 months ago

Note: Some E2E related jobs were not successful as per https://github.com/10up/ads-txt/actions/runs/7477337138 - do we typically ignore these

I have fixed these