WordPress.org

Making WordPress.org

Opened 13 months ago

Closed 9 months ago

#3642 closed enhancement (fixed)

Add "Requires PHP" information to Update API endpoint

Reported by: schlessera Owned by:
Milestone: Priority: normal
Component: API Keywords:
Cc:

Description

As @SergeyBiryukov has pointed out in https://core.trac.wordpress.org/ticket/43987#comment:9, the update information for plugins does not contain the PHP requirements that were introduced with #2952.

To avoid multiple requests, it would be useful to add this requires_php key to the API as well, as that plays a fundamental part in deciding whether an update is available or not.

Change History (7)

#1 @afragen
13 months ago

So just to start the conversation…

If the update transient package for each plugin contained the data for requires and requires_php then that data could be used in combination with new core code to unset specific $transient->response entries that don’t meet requirements.

Additionally, we could add a force_update, or similar element, to allow for updates to older versions requiring security updates.

Any thoughts? @dd32

#2 @dd32
13 months ago

If the update transient package for each plugin contained the data for requires and requires_php then that data could be used in combination with new core code to unset specific $transient->response entries that don’t meet requirements.

The requires_php field has been present since 2018-04-10, and has contained the correct non-null value since 2018-05-08.

Is there anything missing from the WordPress.org side there?

#3 @afragen
13 months ago

Thanks for pointing this out @dd32, I missed it.

This ticket was mentioned in Slack in #meta by sergey. View the logs.


13 months ago

#5 @joyously
10 months ago

Is it just plugins? Or for themes also?

(I know themes don't have the same structure as in readme.txt, etc. but wondered if the API was able to handle themes if we change themes to use a readme.txt like plugins.)

#6 @dd32
10 months ago

This is just for plugins. Themes do not yet support readme.txts.

The Themes API can/will be extended when readme support is added to it, but it won't just be "magically supported".

#7 @dd32
9 months ago

  • Resolution set to fixed
  • Status changed from new to closed

I'm marking this as fixed as the data is there for plugins (as requested).

Note: See TracTickets for help on using tickets.