- Provide a way for the sitesummariser SilverStripe module to query the support timeframes of SilverStripe packages
- Get the rest of the SilverStripe ecosystem using this
- Get the rest of the packagist ecosystem using this
Bundle a .support-timeframe.json into packages that provides support timeframe metadata.
{
"^4": {
"description": "SilverStripe 4 is LTS until 2022ish",
"url": "https://www.silverstripe.org/roadmap",
"support-periods": [
{ "level": "full", "description": "Full support", "until": "2021-06-06" }
{ "level": "partial", "description": "Security/critical fixes only", "until": "2022-06-06" }
]
},
"~4.1.0": {
"description": "SilverStripe 4.1 is supported for 6 months. For longer support we recommend ^4",
"url": "https://www.silverstripe.org/roadmap",
"support-periods": [
{ "level": "partial", "description": "Security/critical fixes", "until": "2018-21-31" }
]
},
}
- Top level keys are composer version strings. Each entry describes support for 1 period:
- "support-periods": an array of 1 or more support periods.
- "level": "full" or "partial". Can be used to show support in green or yellow, for example. More than 1 of each can be supplied, with different descriptions.
- "description": Project-specific identifier of this level of support.
- "until": End-date of the support.
- "description": A summary statement about support.
- "url": An url to find out more details.
- "support-periods": an array of 1 or more support periods.
Addons.SilverStripe.org is already downloading and scanning all the SilverStripe modules. A step can be added to this to cache .support-timeframe.json files.
A simple API for getting support details of 1 package:
GET /api/support-timeframe/(vendor)/(package).json HTTP/1.1
Host: addons.silverstripe.org
Accept: application/json
Or fetch many:
GET /api/support-timeframe/packages.json HTTP/1.1
Host: addons.silverstripe.org
Accept: application/json
Content-type: application.json
[
"(vendor)/(package)",
"(vendor)/(package)",
"(vendor)/(package)"
]
Or look up the support coverge for the version you have specified in your composer.json.
GET /api/support-timeframe/assess-packages.json HTTP/1.1
Host: addons.silverstripe.org
Accept: application/json
Content-type: application.json
{
"(vendor)/(package)": "version-string",
"(vendor)/(package)": "version-string",
"(vendor)/(package)": "version-string"
}
- Call /api/support-timeframe/assess-packages.json
- Get the result
- Add into the UI. Green for full support, yellow for partial support, red for no support. Show the support message, provide links where appropriate.
- TBC. Need a way of calculating the "overlap" of version strings.
I'd probably leave out the
descriptionfield, since that'd be duplicated across a gazillion composer.json files. Just link to the roadmap, and have a simple lookup for our particular keys relevant to our release process within addons somewhere.