WordPress.org

Making WordPress.org

Opened 22 months ago

Closed 14 months ago

Last modified 9 months ago

#1579 closed task (fixed)

Plugins API

Reported by: obenland Owned by: dd32
Milestone: Priority: high
Component: Plugin Directory Keywords:
Cc:

Description (last modified by obenland)

  • Continue supporting everything it currently supports
  • (Create a comprehensive list of what it currently supports).

Attachments (1)

1579-fix-plugin-object-type.diff (1.2 KB) - added by tellyworth 18 months ago.

Download all attachments as: .zip

Change History (42)

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


22 months ago

#2 @obenland
22 months ago

  • Description modified (diff)
  • Write (client-side) Core Unit Tests alongside of it.

Split out in #1614.

#3 @dd32
22 months ago

Just noting it here, since it'll trip someone up.

The Author field in the Plugins API response, is not a committer, contributor, or even the post author. It's the Author and Author URI headers directly from the plugin headers.

#4 @obenland
20 months ago

  • Milestone set to Plugin Directory v3 - M2

#5 @dd32
20 months ago

See also: [3020] [3021] [3022]

In [3020]:
Plugin Directory: Add a REST API endpoint which represents the full plugin data currently exposed through api.wordpress.org.
Although it's unlikely api.wordpress.org will run the API directly, this is a test to verify that all data we have on file is available.

See #1576

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


20 months ago

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


20 months ago

#8 @obenland
20 months ago

  • Milestone changed from Plugin Directory v3 - M2 to Plugin Directory v3 - M3

#9 follow-up: @swissspidy
19 months ago

As discussed in the Shiny Updates weekly meeting, it would be great if the plugin updates API would include the plugin icons for use on the update screens.

See https://github.com/obenland/shiny-updates/issues/5 for some mockups on how the plugin icons would be used.

#10 in reply to: ↑ 9 @dd32
19 months ago

Replying to swissspidy:

As discussed in the Shiny Updates weekly meeting, it would be great if the plugin updates API would include the plugin icons for use on the update screens.

See https://github.com/obenland/shiny-updates/issues/5 for some mockups on how the plugin icons would be used.

Feel free to file a meta ticket for that. The update response API needs to be modernised and have those features added for sure, but for now/in this ticket we're only focusing on migrating from the existing bbPress powered API to a WordPress backend.

#11 @swissspidy
19 months ago

Thanks! Just opened #1714.

#12 @obenland
19 months ago

  • Milestone changed from Plugin Directory v3 - M3 to Plugin Directory v3 - M4

#13 @dd32
19 months ago

We need

  • A stand alone PHP script which reads the WordPress postmeta table to perform updates
  • (ideally) A stand alone PHP script which can handle the plugin_information requests & /hello-dolly.json requests. I'd probably suggest we should just cache a full response from the REST API (/wp-json/plugins/v1/plugin/hello-dolly/) and handle the fields and conditional wp_version checks, as well as the output format (PHP serialized, XML, and JSON) in that handler
  • A REST API Endpoint which can be used for the hot_tags endpoint
  • A REST API Endpoint which can be used for the query_plugins endpoints, this mostly wraps WP_Query but has a lot of random and weird logic burried in it

Loading WordPress for all these requests isn't going to be viable, but for some we'll have little choice.

  • The update handler should most definitely not load WordPress at all.
  • The hot_tags handler could just cache the result of the WordPress endpoint, so it doesn't require loading WordPress often.
  • The plugin_information handler would be a good one to cache, and not hit WordPress on, as it's requested often enough and accounts for a significant amount of the api traffic.
  • The plugin_information handler via hello-dolly.json should be made cacheable, that means it should only use the data contained within the URL for the response, fetching the WordPress version from the user_agent isn't viable

#14 @dd32
19 months ago

  • Type changed from enhancement to task

#15 @dd32
19 months ago

In 3228:

Plugin Directory: Update a missed taxonomy name and correct a typo.

See #1579, #1573

#16 @obenland
19 months ago

  • Priority changed from normal to high

#17 @obenland
19 months ago

  • Owner set to dd32
  • Status changed from new to assigned

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


19 months ago

#19 @dd32
19 months ago

In 3289:

Plugin Directory: First swipe at handlers for api.wordpress.org/plugins/info/*.
The API handlers are designed to be stand-alone scripts which run only with an object cache for caching, When cached data is unavailable, WordPress is included to fetch the data from a rest api endpoint.

See #1579

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


18 months ago

#21 @obenland
18 months ago

  • Milestone changed from Plugin Directory v3 - M4 to Plugin Directory v3 - M5

#22 @dd32
18 months ago

In 3368:

Plugin Directory: api.wordpress.org handlers: Fix a classname typo in r3289

See #1579

#23 @obenland
18 months ago

In 3439:

Plugin Directory: Consolidate review queries.

See #1719, #1579.

#24 @obenland
18 months ago

In 3440:

Plugin Directory: Revert [3439] until we have caching figured out.

See #1719, #1579.

#25 @tellyworth
18 months ago

attachment:1579-fix-plugin-object-type.diff fixes two issues in the PHP API:

  1. PHP Warning: Invalid argument supplied for foreach() when the $contribs array is null.
  1. A regression: in the old API, query_plugins returns an array of plugin objects. In the new one, they were assoc arrays - this casts them to objects.

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


17 months ago

#27 @obenland
17 months ago

  • Milestone changed from Plugin Directory v3 - M5 to Plugin Directory v3 - M6

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


16 months ago

#29 @dd32
16 months ago

In 3805:

Plugin Directory: Fix the return types for the PHP API to be compatible with the previous return behaviour.

Props tellyworth.
See #1579.

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


16 months ago

#31 @obenland
16 months ago

  • Milestone changed from Plugin Directory v3 - M6 to Plugin Directory v3 - M7

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


16 months ago

#33 @obenland
16 months ago

In 3863:

Plugin Directory: Use Reviews output instead of rolling our own.

Returns two reviews with the proper markup. We should review what we want the
final output to be here.

Also passes the section slug as a second parameter to the_content filter
for more context, similarly to the Plugin Directory theme..

See #1579, #1719.

#34 @obenland
16 months ago

In 3864:

Plugin Directory: Add support information to API response.

Allows us toe rebuild the support loading bar in React.

See #1579, #1719.

#35 @obenland
16 months ago

In 3888:

Plugin Directory: Add screenshots to API response.

Allows us to build the screenshots section in JS.

See #1828, #1579.

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


16 months ago

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


14 months ago

#38 @tellyworth
14 months ago

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

Closing this, replaced by #2112.

#39 @dd32
14 months ago

In 4310:

Plugin Directory: Revert [3863] as the Reviews markup in the API is intentionally different from the markup used on WordPress.org.

This fixes review display when WordPress is using the new API.

See #1579, #1719.

#40 @dd32
14 months ago

In 4311:

Plugin Directory: Pull reviews from bbPress2 rather than the old bbPress1 support forums.

See #1579

#41 @samuelsidler
9 months ago

  • Milestone Plugin Directory v3 - M7 deleted

Milestone Plugin Directory v3 - M7 deleted

Note: See TracTickets for help on using tickets.