Skip to content

[FEATURE] Introduce composer only packages to TER

Torben Hansen requested to merge feature/544-composer-packages into develop

This change introduces the new table tx_terfe2_domain_model_package, which can hold data of TYPO3 extensions that are available on Packagist.org only. The new table has 3 fields (package name, package data and import date) which are automatically filled with data by the ImportComposerPackages symfony console command. The symfony console command uses the Packagist.org API to fetch package data of all packages, which have “typo3-cms-extension” as type. The symfony console command follows the best practices for the Packagist.org API (no concurrent connections, uses HTTP2) and additionally only fetches data in small chunks of 100 (configurable) packages per scheduler run.

The ImportComposerPackages command imports only packages, which are not already existing as “Extension with composer support” (identified by field composer_name) in TER.

Imported packages are indexed by a new Solr search indexer. Additionally a new facet “Installation method” has been added to allow users to filter by Extensions, which either are installed using the TYPO3 Extension Manager or using composer.

image

Each imported package has a dedicated view, where information about a package is shown. This view is similar to the single record view of an extension, but contains less information (no download-count, no statistics, no additional extensions by author). The following screenshot shows the view for b13/cloudflare-cdn

image

Some existing partials have been adapted so they can be reused for both extensions and packages.

Manual tasks before/after deployment:

  • Extension setting packageImportPid must be configured with the PID, where packages should be stored
  • A new TYPO3 page must be created, where the new Plugin “Package details” is placed
  • In ext:ter_layout, the packageDetailPid must be configured
  • In site configuration Extensions.yml, the package detail PID must be configured
  • Setup scheduler task for package import

Note, that this PR may not be feature complete. It currently does not cover manual exclusion of packages (e.g. packages which wrongly use “typo3-cms-extension” as type) or does not show if a package has known security vulnerabilities. Such features will/can be added at a later step.

Resolves #544 (closed)

Edited by Torben Hansen

Merge request reports