ampproject / ampproject/amp-toolbox-php

Improve handling of latest extension versions in spec

Open
#232 5 comments 0 reactions 1 assignee Claimed by @ediamin View on GitHub
Validator
Dominant language
PHP
Stars
74
Forks
25
Avg merge
1d 15h
Merged PRs (30d)
3

Description

Multiple TODOs are still open in the `ExtensionSpec` template. These need to be resolved be generally improving the handling of latest versions of extensions.

- [ ] The spec will need to be adapted to be informed by https://github.com/ampproject/amphtml/blob/main/build-system/compile/bundles.config.extensions.json, where the latestVersion is stored with the spec (and the highest version is not always the same as latest), as well as any additional Bento metadata.
- [ ] There is one case where an extension lacks a `'latest'` version, but maybe not for long. See https://github.com/ampproject/amphtml/pull/34636.
- [ ] Why isn't the sorting done at ingestion time? Then `getLatestVersion()` could just be doing something like `return self::LATEST_VERSION`.

https://github.com/ampproject/amp-toolbox-php/blob/c680d60e9cf03c0e4c8a0f0ff4b3b3c662058eea/bin/src/Validator/SpecGenerator/Template/ExtensionSpec.php#L29-L67

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.