[wp-meta] [Making WordPress.org] #3474: Introduce `serve-happy` API endpoint

Making WordPress.org noreply at wordpress.org
Wed Feb 21 06:51:01 UTC 2018


#3474: Introduce `serve-happy` API endpoint
--------------------------------------+------------------
 Reporter:  flixos90                  |       Owner:
     Type:  task                      |      Status:  new
 Priority:  normal                    |   Milestone:
Component:  API                       |  Resolution:
 Keywords:  has-patch has-unit-tests  |
--------------------------------------+------------------
Changes (by flixos90):

 * keywords:  needs-patch needs-unit-tests => has-patch has-unit-tests


Comment:

 [attachment:3474.diff] introduces the `serve-happy` API endpoint. Details:

 * The `index.php` file procedurally executes the code, but all
 implementation details are part of separate classes.
 * All changes related to regular maintenance will occur in the separate
 `config.php` file (it holds the PHP version numbers, the Servehappy page
 URL etc.).
 * The code requires at least PHP 7 to run (which is fine here, per Slack
 discussion).
 * The main class handling a request and serving the appropriate response
 is `Serve_Happy\API`. The other classes are simple utility classes
 representing request and response.
 * The whole implementation has been inspired by how the WP REST API works,
 with several simplifications where the original flexibility would be
 overkill here.
 * Tests are also part of the patch, providing solid coverage.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3474#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list