Composer packages and Packagist
This page is for application creators who publish their extension so installations can composer require it.
Exponential and every extension it ships are Composer packages on Packagist.
Contents
- Package basics
- Versions and constraints
- Publishing on Packagist
- Installing into an installation
- Updating safely
Package basics
| Key | Value |
|---|---|
name | vendor/name in lower case |
type | ezpublish-legacy-extension |
extra.ezpublish-legacy-extension-name | the directory name under extension/ |
license | an SPDX id, for example GPL-2.0-or-later |
require | PHP version and libraries |
Versions and constraints
- Versions come from Git tags (
v1.2.3). A published tag is permanent: never move or delete it; publish the next version instead (Versions and releases). ~1.2.3means>=1.2.3 <1.3.0: the last position given floats. This is how the rootcomposer.jsonpins extensions ("se7enxweb/eztags": "~2.4.11").
Publishing on Packagist
- Push the repository to a public host (the se7enxweb extensions are on GitHub).
- Submit the repository URL on Packagist.
- Add Packagist's webhook to the repository, so new tags appear without a manual update; a package that stays on an old version on Packagist usually has no webhook.
- Tag a release; check that Packagist shows it.
Installing into an installation
composer require yourvendor/expdemo:~1.0.0
php bin/php/ezpgenerateautoloads.php -eThen activate it (3.5 Extensions are Composer packages).
Updating safely
- Update one package deliberately (
composer update yourvendor/expdemo), after reading its release notes; notcomposer updateon everything on a live site. - A hand-made
git clonein place of a package Composer installed as an archive is replaced by the next update, history included; let Composer make clones (preferred-install) if you develop in place. - Test the update on staging first (A deployment pipeline).
Related pages
- Packaging your application as an extension
- PHP and Composer standard
- Getting the code
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.