Tooling¶
This page describes the development tools FedMS expects. The non-negotiable rule is: everything PHP-related goes through L3D.
L3D¶
LakeDrops DockerDrupalDevelopment (L3D) is a Docker-based development environment. It manages containers, volume mounts, SSH agent forwarding, and environment variables for you, and provides a single command-line entry point:
1 | |
What l3d wraps¶
| Instead of | Run |
|---|---|
php … |
l3d php … |
composer … |
l3d composer … |
drush … |
l3d drush … |
ahoy … |
l3d ahoy … |
phpunit … |
l3d phpunit … |
phpcs … |
l3d phpcs … |
phpstan … |
l3d phpstan … |
node / npm / npx / yarn … |
l3d <tool> … |
bash (in container) |
l3d bash |
drupalorg … |
l3d drupalorg … |
glab … |
l3d glab … |
Hard rule¶
Never run PHP, Composer, Drush, Ahoy, phpunit, phpcs, phpstan,
node, npm, drupalorg, or glab directly on the host. Always
prefix with l3d. This guarantees the right PHP version, the right
Composer config, and the right access to SSH keys and credentials.
Where to run l3d from¶
Run l3d from the directory you are actually working in — do
not cd to the project root first. L3D:
- Walks up from your current directory to find the project root
(the directory with
.envcontainingCOMPOSE_PROJECT_NAME=). - Detects the project root for you.
- Transitions back into your subdirectory inside the container before running the command.
This matters when you are working in a fedms_* module's own git
repo — running l3d glab from inside the module operates on the
module's repo, not the site's.
Bootstrap once per session¶
If the project root contains docker-compose.yml, bring the stack
up to date at the start of a session:
1 | |
Once per session is enough. It is fine to skip if you know the stack is already current.
Ahoy¶
Ahoy is a YAML-driven command runner. FedMS uses it to expose high-level operations.
Top-level Ahoy commands¶
From the site root:
1 2 3 4 5 6 7 | |
Module-level Ahoy commands¶
Some modules ship their own Ahoy:
1 2 3 4 | |
Drush¶
Drush is the Drupal command-line tool. Most things you would do via the Drupal admin UI can also be done via Drush.
Common commands:
1 2 3 4 5 6 7 8 9 10 11 | |
Composer¶
Composer is the PHP dependency manager. FedMS uses it heavily.
1 2 3 4 | |
The FedMS Composer registry must be in your composer.json:
1 2 3 4 5 6 | |
The Amplius tenant composer.json includes this automatically.
glab¶
glab is the GitLab CLI. FedMS uses it for MRs, issues, pipelines.
1 2 3 4 5 6 7 | |
Run glab from the directory of the repo you want to target. If
you want to operate on fedms_task's repo, cd into
web/modules/contrib/fedms_task first.
Database access¶
Never call mysql or mariadb directly on the host. Always go
through Docker Compose:
1 2 | |
Credentials are in .env at the project root.
For piping input (e.g. importing a dump):
1 2 | |
Mailpit¶
The Docker stack ships a mailpit service that catches all outbound
mail in development. Open
https://mailpit-<your-instance>.fedms.lakedrops.com (or your local
mailpit URL) to inspect every message.
Common gotchas¶
| Symptom | Fix |
|---|---|
l3d: command not found |
Ensure /usr/local/bin/l3d exists. See LakeDrops L3D installation. |
| Container not running | l3d bash once to bootstrap; then retry. |
| Wrong PHP version | Check PHP_VERSION in .env. |
glab sees the wrong repo |
You're in the wrong directory. cd into the right repo. |
ahoy test phpcsmodule eca_content fails |
Use the parent module name (eca). The command resolves to web/modules/contrib/<name>/. |
Next steps¶
- Repository layout — where to run these commands.
- Testing — the test commands in detail.
- Contributing — the change workflow.