Integrate extension license handling
Problem to solve
Currently, it is not possible to filter extensions by license type, display the license on the TER detail page, or manually filter the TER database by license type. Also, when uploading extensions to TER, the license is not checked on the server side, so you have to rely on the user's responsibility.
Further details
The license is currently written to composer.json and/or a special extension license file that is not checked by TER.
Proposal
It would be nice to integrate a license handling into the TER by:
- implementing a license scanner of TYPO3 extensions
- scanning for license in common files (composer.json, LICENSE(.txt|.rst|.md)?)
- returning license in unified wording (or null)
- scanning for and storing the licenses of all TYPO3 extensions in TER on-demand
- scanning with license scanner
- option for dry-run
- option for being verbose with grouping extensions by
- no license
- changed license
- same license
- and sub grouping all types by license.
- scanning for the license on upload to TER on server side
- scanning with license scanner
- rejecting if wrong license
- with response containing all supported licenses and a getting in contact note
- with logging extension details and wrong license
- storing license in TER database
- adapting clients to handle responses (API = Tailor, UI = Upload form of my.typo3.org)
- showing license in TER list tile and linking license to TYPO3 license page with explanations of all common licenses
- showing license in TER detail page and linking license to TYPO3 license page with explanations of all common licenses
- extending TER filter by license type
- extending TER sorting by license type
What does success look like, and how can we measure that?
Success can be
- The license scanner recognizes the license in composer.json and LICENSE* file on manual run.
- A TER run has been successful in dry-run mode and is listing all extensions with either no license or with changed license (as the extension license DB field is empty on first run).
- A second TER run without dry-run mode shows the same listing (as the first run was in dry-run mode).
- A third TER run in dry-run mode is listing all extensions with either no license or with same license (as no modifications have been done between second and third run).
- A TER upload has been successful and the license field is not empty in the TER DB.
- An exception is logged on TER side which states which license was rejected on extension upload.
- The TER frontend filters by/sorts by/displays the license in list view
- The TER frontend shows the license in detail view