Skip to content

Ensure valid composer.json for extensions

Problem to solve

  • Some extensions do not include a composer.json.
  • Some extensions do not have a valid composer.json or include a composer.json with deprecations.
  • Information about composer.json (for extensions) is not consistent and not regularly updated.

To further propagate use of Composer and use of best practices for composer.json and to ensure stressless installation and maintainance of TYPO3 sites, it might be useful to do some basic checks on extensions.

Example

bp_pagetree

$ composer validate
Deprecation warning: replace.bp_pagetree is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
composer --version
Composer version 1.9.1 2019-11-01 17:20:17

composer.json:

"replace": {
        "bp_pagetree": "self.version",
        "typo3-ter/bp_pagetree": "self.version"
    },

See also:

Further details

long term goal:

  • all TYPO3 extensions listed on extensions.typo3.org include valid composer.json
  • documentation for extension authors is consistent and easily findable (beyond scope of this issue, should be handled in documentation)

Proposal

Regularly run composer validate on extensions listed on extensions.typo3.org.

What does success look like, and how can we measure that?

Acceptence Criterias

Related