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

Add PHP version check for plugin. #258

Merged
merged 2 commits into from
Jul 28, 2023
Merged

Conversation

rahulsprajapati
Copy link
Contributor

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 #256

How to test the Change

  1. Setup a WordPress environment running PHP 7.3
  2. Install Autoshare for Twitter 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:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@github-actions github-actions bot added the needs:code-review This requires code review. label Jul 20, 2023
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rahulsprajapati,

Thank you for the PR. The code looks good to me. However, I added 2 minor notes to discuss. Could you please help to check on it?

Thanks

autoshare-for-twitter.php Outdated Show resolved Hide resolved
autoshare-for-twitter.php Show resolved Hide resolved
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @rahulsprajapati. All looks good now. 🚀

@iamdharmesh iamdharmesh added this to the 2.2.0 milestone Jul 28, 2023
@iamdharmesh iamdharmesh removed the needs:code-review This requires code review. label Jul 28, 2023
@iamdharmesh iamdharmesh merged commit b6ce9d8 into develop Jul 28, 2023
10 of 11 checks passed
@iamdharmesh iamdharmesh deleted the fix/256-php-ver-check branch July 28, 2023 14:47
@iamdharmesh iamdharmesh modified the milestones: 2.2.0, 2.1.1 Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PHP checks
2 participants