Getting the code for a bundle
This page is for whoever writes the build of a bundle. The installation guide documents three ways to get the code (3.2 Three ways to get the code); each suits a different kind of bundle.
Contents
The three ways
| Way | Gives you | Source |
|---|---|---|
A. git clone and composer install | the kernel and every se7enxweb extension as Git clones with their history | 3.2 A |
B. composer create-project | release archives without history (clones with --prefer-source --keep-vcs) | 3.2 B |
C. composer require into an empty directory | the kernel as a package of your own project, with your own composer.json | 3.2 C |
Which way for which bundle
| Bundle | Way | Why |
|---|---|---|
| Container or server image of a fixed release | B, with a version | archives are smaller; the image is rebuilt for every update anyway |
| Agency starter kit | C | your composer.json and composer.lock are the specification of the kit |
| A bundle whose recipients develop on it | A | Git shows what changed and lets them update with Git (Develop with Git) |
| Hosting panel installer | B or a prepared archive of B | fast, no history needed in every account |
| Distribution package | B or a source archive of the tag | the package manager does the updating |
Build commands
A pinned release, archives, no test tools (way B):
composer create-project se7enxweb/exponential:v6.0.14 exponential --no-devcreate-project "treats the downloaded composer.json as the root package, so its config.allow-plugins ... and its
post-install-cmd script apply: the class maps are generated at the end (php bin/php/ezpgenerateautoloads.php). On
a production server add --no-dev, which leaves out the test tools" (3.2 B).
Your own project (way C):
mkdir exponential
cd exponential
composer config allow-plugins.se7enxweb/exponential-legacy-installer true
composer require se7enxweb/exponential
php bin/php/ezpgenerateautoloads.phpThe package has the type ezpublish-legacy; the installer plugin puts it in the project root. "If you answer no [to
trusting the plugin], the kernel lands in vendor/se7enxweb/exponential/ and the extensions in vendor/ as well,
where nothing finds them." Composer runs only your root package's scripts, so generate the class maps yourself.
Note
Which PHP a version needs decides whether Composer installs it at all: v6.0.8 to v6.0.14 require PHP ^8.1;
the 6.0.15 line (main) accepts PHP 8.0. "No published tag accepts PHP 8.0"
(3.1). Build with the PHP your bundle ships.
Check the result
php bin/php/console --version
ls vendor/autoload.php
composer show se7enxweb/exponentialThe first command names the version (for example console (Exponential) 6.0.15stable). "If vendor/autoload.php is
missing, Composer did not finish; run composer install again and read its output from the first error"
(Check the result).
Then check what the PHP of your bundle lacks:
php bin/php/console exp:velocity ext checkIt "lists every extension the installation wants, marks what is missing and prints the install command" (Containers: Docker and Podman).
Common mistakes
- Building from
mainand calling it a release.mainmoves; record the commit, or build from a tag (Versions, tags and pinning). - Running
composer updatein a build. It resolves new versions each time. Build withcomposer installfrom your lock file (Lock files and reproducible builds). - Building as root and shipping root-owned files. Fix ownership before you package (File permissions and var/ ownership).
- Shipping
.gitdirectories by accident. Way A and--keep-vcskeep them; decide whether your recipients want them.
Related pages
- Chapter 3: Getting the code
- Composer-based bundles
- Composer and Git on servers
- 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.