Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

composer.json for a theme

Write the composer.json that makes a theme installable with composer require - name, description, type ezpublish-legacy-extension, license, authors, support, require, suggest and the extension name - with a complete…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/extensions/composer-json-for-a-theme.md

On this page

composer.json for a theme

This page is for designers who want users to install their theme with one command: composer require yourvendor/mytheme.

A complete example

cjw_themes_jumper publishes this (shortened only in keywords):

{
    "name": "se7enxweb/cjw_themes_jumper",
    "description": "CJW Themes Jumper: the design starter for Exponential, served by the starter siteaccesses (port of the Nexus v2 starter look)",
    "type": "ezpublish-legacy-extension",
    "keywords": [ "Exponential", "Exponential 6", "legacy extension", "design", "theme" ],
    "homepage": "https://github.com/se7enxweb/cjw_themes_jumper",
    "license": "GPL-2.0-or-later",
    "authors": [
        { "name": "7x", "homepage": "https://se7enx.com", "email": "[email protected]", "role": "Author" }
    ],
    "support": {
        "issues": "https://github.com/se7enxweb/cjw_themes_jumper/issues",
        "source": "https://github.com/se7enxweb/cjw_themes_jumper"
    },
    "require": {
        "php": ">=8.0",
        "se7enxweb/ezpublish-legacy-installer": "*"
    },
    "extra": {
        "ezpublish-legacy-extension-name": "cjw_themes_jumper"
    }
}

The fields

FieldWhy it matters
namevendor/package, lower case. It is the name users require and Packagist lists
descriptionShown on Packagist and in search results
type: ezpublish-legacy-extensionMakes the legacy installer place the package below extension/
licenseAn SPDX identifier, the same license as the LICENSE file
authors, homepage, supportWho made it and where to ask
requirePHP versions, the installer plugin, extensions the theme cannot work without
suggestExtensions it works better with (require and suggest)
extra.ezpublish-legacy-extension-nameThe folder name below extension/ (The Composer installer and the folder name)
versionUsually left out: Packagist reads the version from the tag. If you keep it, keep it in sync

Step by step

  1. Create composer.json at the theme's root, using the example with your values.

  2. Validate it:

    composer validate composer.json

    Expected: ./composer.json is valid. Warnings about a missing version or a * constraint can be read and accepted or fixed.

  3. Commit it with the release that introduces it.

  4. Test the install before you publish (Testing a Composer install).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x