Make WordPress Core

Opened 5 weeks ago

Last modified 11 days ago

#50593 reviewing defect (bug)

Check requirements when uploading a plugin/theme by ZIP

Reported by: mariovalney Owned by: SergeyBiryukov
Milestone: 5.5.1 Priority: normal
Severity: normal Version: 5.4.2
Component: Upgrade/Install Keywords: needs-patch
Focuses: Cc:


From 9757 we agree uploading a plugin should check PHP required version.

We already check the package is a valid plugin and I think we can add both verifications: Requires PHP and Requires at least. And extend it to themes.

Change History (6)

#1 @SergeyBiryukov
5 weeks ago

  • Milestone changed from Awaiting Review to 5.5

This ticket was mentioned in PR #401 on WordPress/wordpress-develop by mariovalney.

4 weeks ago

  • Keywords has-patch added; needs-patch removed

Add PHP/WP version validation to upload ZIP packages.
Support to theme and plugins.

Ticket: https://core.trac.wordpress.org/ticket/50593

#3 @mariovalney
4 weeks ago

  • Keywords needs-design needs-unit-tests added

Added a PR with validation to themes and plugins.
I'm using the same strings from 9757 to keep UX.

I guess we can improve this UI at least with the link do HelpHub like @desrosj suggested (wp_get_update_php_url / wp_get_default_update_php_url / wp_get_update_php_annotation).

Maybe keep version string in another line?

Here are prints for each case:

PHP Version for Plugin

WP Version for Theme

Last edited 4 weeks ago by mariovalney (previous) (diff)

#4 @SergeyBiryukov
4 weeks ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @SergeyBiryukov
11 days ago

In 48666:

Upgrade/Install: Check WordPress and PHP version requirements when uploading a plugin or theme from ZIP file.

Props mariovalney, desrosj.
See #50593.

#6 in reply to: ↑ description @SergeyBiryukov
11 days ago

  • Keywords needs-patch added; needs-screenshots has-patch needs-design needs-unit-tests removed
  • Milestone changed from 5.5 to 5.5.1

Replying to mariovalney:

(@desrosj suggests) When the PHP or WordPress requirements are not met, can we link to the HelpHub so that the user has some direction: Maybe this page: https://wordpress.org/support/update-php/?

Let's address this in 5.5.1.

Note: See TracTickets for help on using tickets.