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

Version constraints your users write

Recommend a Composer version constraint for your theme in its README - tilde, caret, exact pins and dev-main - what each lets an update bring, and how your numbering makes them safe.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/distribution/version-constraints-for-users.md

On this page

Version constraints your users write

This page is for designers who tell users how to require their theme. The constraint in the user's composer.json decides which of your future releases composer update will install.

The common constraints

ConstraintAllowsGood for
~1.0.24>=1.0.24 <1.1.0Getting every fix of the 1.0 line, nothing bigger
^1.0>=1.0.0 <2.0.0Getting every release that keeps compatibility, if you move the middle position only for compatible additions
1.0.24Exactly thatSites that update only after their own review
dev-mainThe newest commit on mainTesting unreleased work, never production

The tilde floats the last position given: ~1.0.24 accepts 1.0.25 and also 1.0.100. Because only the last position counts up in normal releases (After .9 comes .10), a tilde constraint receives every normal release and never a deliberate step.

What to recommend

Write one line in your README, matched to how you number releases. For example:

composer require yourvendor/mytheme:~1.0.24

and explain: "updates bring fixes and improvements of the 1.0 line; 1.1 will be announced with its changes".

When you move a higher position

Say so in the release notes and the README: what changed, and that users must change their constraint to receive it (~1.1.0). Users with ~1.0.24 stay on the 1.0 line until they decide.

Step by step: check a constraint

composer why-not yourvendor/mytheme 1.1.0

Expected for ~1.0.24: a line saying the root requires ~1.0.24, which does not allow 1.1.0.

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