APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Composer

Technical details of the Composer installation phase.

The Composer installation phase is responsible for installing all Composer dependencies required by APPNETOS applications.

Unlike many PHP projects, Composer is not executed once for the entire workspace.

Instead, every APPNETOS application manages its own Composer dependencies independently.

Goals

The Composer installation phase has the following responsibilities:

  • Discover all APPNETOS applications.
  • Detect applications containing a composer.json .
  • Install Composer dependencies.
  • Skip applications without Composer support.
  • Produce deterministic installation results.

Application Discovery

The installer automatically scans the APPNETOS workspace for applications.

Every discovered application is evaluated independently.

Applications containing a composer.json are processed.

Applications without a composer.json are skipped.

No manual configuration is required.

Independent Dependencies

Each APPNETOS application owns its own dependency tree.

This provides several advantages:

  • Independent application development.
  • Independent application releases.
  • Reduced dependency coupling.
  • Easier customer-specific extensions.
  • Cleaner separation between applications.

Applications therefore remain self-contained.

Root Repository

The APPNETOS root repository is not part of the application dependency system.

Its Composer configuration exists exclusively for development tooling.

Typical examples include:

  • PHP CS Fixer
  • Static analysis tools
  • Development utilities

Application runtime dependencies are never installed into the root repository.

Installation Process

For every discovered application the installer performs the following steps.

  1. Verify that the directory represents a valid APPNETOS application.
  2. Detect a composer.json .
  3. Execute Composer.
  4. Report success or failure.
  5. Continue with the next application.

Applications without Composer dependencies are skipped automatically.

Git Integration

Before executing Composer the installer configures the required Git safe directory.

This prevents Git ownership warnings inside Docker containers.

The configuration is performed only once and is fully idempotent.

Configuration

The Composer phase can be configured through environment variables.

Current configuration options include:

Variable Description
APPNETOS_COMPOSER_COMMAND Composer executable
APPNETOS_COMPOSER_NO_DEV Install without development packages
APPNETOS_COMPOSER_PREFER_DIST Prefer distribution archives
APPNETOS_COMPOSER_OPTIMIZE_AUTOLOADER Generate optimized autoloader
APPNETOS_COMPOSER_NO_INTERACTION Disable interactive prompts

Error Handling

If Composer fails for an application, the installation process stops immediately.

This prevents partially installed environments.

The reported error always identifies the application that caused the failure.

Idempotency

The Composer installation phase is fully idempotent.

Running the installer repeatedly does not reinstall unchanged dependencies unnecessarily.

Composer itself determines whether package changes are required.

Summary

The Composer installation phase provides:

  • Automatic application discovery
  • Independent dependency management
  • Automatic Git configuration
  • Deterministic installations
  • Fully repeatable execution

It forms the foundation for all subsequent installation phases.

Next Steps

Previous

Installer Reference

Go to Installer Reference

Next

Git

Go to Git