PHPackages                             application-manager-tools/am-driver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. application-manager-tools/am-driver

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

application-manager-tools/am-driver
===================================

Symfony bundle and framework-agnostic core to integrate managed applications with Application Manager (orchestration, consumption, operational state).

0.0.16(3w ago)0175MITPHPPHP ^7.4|^8.0CI passing

Since May 15Pushed 3w agoCompare

[ Source](https://github.com/ApplicationManagerTools/AMDriver-php)[ Packagist](https://packagist.org/packages/application-manager-tools/am-driver)[ RSS](/packages/application-manager-tools-am-driver/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (8)Dependencies (24)Versions (20)Used By (0)

application-manager-tools/am-driver
===================================

[](#application-manager-toolsam-driver)

Symfony bundle and framework-agnostic PHP library to integrate **managed applications** with [Application Manager](https://github.com/ApplicationManagerTools) (orchestration commands, consumption webhooks, operational state push).

Specification: [cahier des charges connecteur AM](docs/README.md).
**OpenAPI 3.1.1** (récepteur + client AM + kit Swagger UI) : [docs/openapi/README.md](docs/openapi/README.md).
**Manuel d’intégration (intégrateurs humains)** : [docs/MANUEL-INTEGRATION-INTEGRATEURS.md](docs/MANUEL-INTEGRATION-INTEGRATEURS.md).
Intégration technique : [docs/INTEGRATION.md](docs/INTEGRATION.md). Même app Symfony qu’AM (dogfooding) : [docs/INTEGRATION-SAME-APP.md](docs/INTEGRATION-SAME-APP.md). Écarts AM : [docs/ECARTS-AM.md](docs/ECARTS-AM.md).

Install
-------

[](#install)

```
composer require application-manager-tools/am-driver
```

PHP `^7.4`, `symfony/http-client` and `symfony/console` `^5.4|^6.4|^7.0|^8.0`.

Développement du bundle (Docker)
--------------------------------

[](#développement-du-bundle-docker)

Comme le back ApplicationManager : `./bin/php` exécute PHP dans le conteneur Compose (repli sur le PHP hôte si Docker est absent).

```
./install          # composer install + répertoires var/
./build            # image PHP (optionnel si BUILD_WHEN_INSTALL=true dans .env.local)
./bin/php -v
./bin/composer install
./bin/phpunit
./codecheck        # php-cs-fixer + phpstan + phpunit
```

Swagger UI (spec récepteur, port `AM_DRIVER_SWAGGER_PORT`, défaut `18098`) :

```
docker compose up -d swagger-ui
```

Réceptacle HTTP (port hôte configurable via `RECEPTACLE_PORT` dans `.env`, défaut `18099`) :

```
docker compose run --rm -p ${RECEPTACLE_PORT:-18099}:8099 php \
  php bin/am-driver serve --host=0.0.0.0 --port=8099 --data-dir=var/am-driver/receptacle
```

Variables Docker : `.env` (versionné) et `.env.local` (surcharges locales, non versionné).

Symfony quickstart (≈10 minutes)
--------------------------------

[](#symfony-quickstart-10-minutes)

1. Register the bundle (Flex discovers it automatically, or):

```
// config/bundles.php
ApplicationManagerTools\AmDriver\Bridge\Symfony\AmDriverBundle::class => ['all' => true],
```

2. Configure (see `.env.local.dist`):

```
# config/packages/am_driver.yaml
am_driver:
    am_base_url: '%env(AM_DRIVER_AM_BASE_URL)%'
    source: '%env(AM_DRIVER_SOURCE)%'
    route_prefix: am   # → /am/orchestration/commands, /am/instance-operational-state
    consumption_webhook_token: '%env(AM_DRIVER_CONSUMPTION_WEBHOOK_TOKEN)%'
    orchestration_callback_token: '%env(AM_DRIVER_ORCHESTRATION_CALLBACK_TOKEN)%'
    orchestration_command_token: '%env(AM_DRIVER_ORCHESTRATION_COMMAND_TOKEN)%'
    operational_state_token: '%env(AM_DRIVER_OPERATIONAL_STATE_TOKEN)%'
```

3. Import routes:

```
# config/routes/am_driver.yaml
am_driver:
    resource: '@AmDriverBundle/Resources/config/routes.yaml'
```

4. Implement the three handlers (your product logic only):

```
use ApplicationManagerTools\AmDriver\Core\Contract\CreateInstanceHandlerInterface;
use ApplicationManagerTools\AmDriver\Core\Dto\CreateInstanceHandlerResult;
use ApplicationManagerTools\AmDriver\Core\Dto\OrchestrationCommand;

final class MyCreateInstanceHandler implements CreateInstanceHandlerInterface
{
    public function handle(OrchestrationCommand $command): CreateInstanceHandlerResult
    {
        // provision tenant / DB / storage
        return CreateInstanceHandlerResult::fromArray([
            'startedAt' => (new \DateTimeImmutable())->format(\DATE_ATOM), // required
            'integrationInstanceId' => $tenantId, // required
            'location' => 'https://tenant.example/login', // free-form: any other key is relayed as-is to AM
        ]);
    }
}
```

`CreateInstanceHandlerResult::fromArray()` requires two non-empty keys: `startedAt` and `integrationInstanceId`. Every other key you provide (`location`, ...) is opaque to the bundle: it is relayed verbatim in the JSON body of the callback POSTed to Application Manager.

Register services with Symfony autoconfigure, or explicit tags in `services.yaml`.

5. Optional: push consumption from your code:

```
$publisher->pushResourceConsumption($tenantId, 'proof_storage_mo');
```

`source` values (stable)
------------------------

[](#source-values-stable)

Product`source`Captain Learning`captain-learning`Accident Prediction`accident-prediction`Application Manager (self-managed)`application-manager`Core-only (no bundle)
---------------------

[](#core-only-no-bundle)

Use classes under `ApplicationManagerTools\AmDriver\Core\` and wire `AmApiClient`, `OrchestrationCommandProcessor`, `ResourceSnapshotManager` manually.

CLI (local development)
-----------------------

[](#cli-local-development)

```
vendor/bin/am-driver serve --port=8099
vendor/bin/am-driver orchestration:simulate create
vendor/bin/am-driver state:push-sample
vendor/bin/am-driver consumption:push --tenant-id=... --resource-key=seats --value=12 --am-url=... --token=...
```

### E2E loop (receptacle)

[](#e2e-loop-receptacle)

Terminal 1:

```
vendor/bin/am-driver serve --port=8099 --token-command=dev-command-token --token-state=dev-state-token
```

Terminal 2:

```
vendor/bin/am-driver orchestration:simulate create --token=dev-command-token
vendor/bin/am-driver state:push-sample --token=dev-state-token
```

Data is persisted under `/tmp/am-driver-receptacle` by default (`--data-dir`).

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

16

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b55e08523b4e1c881655796925ea5ac3ed5d997b533185be986b4a0e0d4f73c4?d=identicon)[fredlogipro](/maintainers/fredlogipro)

---

Top Contributors

[![EddyLogipro](https://avatars.githubusercontent.com/u/245829174?v=4)](https://github.com/EddyLogipro "EddyLogipro (24 commits)")[![frederic100](https://avatars.githubusercontent.com/u/50176793?v=4)](https://github.com/frederic100 "frederic100 (15 commits)")[![n-d0](https://avatars.githubusercontent.com/u/145608217?v=4)](https://github.com/n-d0 "n-d0 (2 commits)")[![Nico-l-as](https://avatars.githubusercontent.com/u/245830418?v=4)](https://github.com/Nico-l-as "Nico-l-as (1 commits)")

---

Tags

Symfony Bundleorchestrationapplication-manager

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/application-manager-tools-am-driver/health.svg)

```
[![Health](https://phpackages.com/badges/application-manager-tools-am-driver/health.svg)](https://phpackages.com/packages/application-manager-tools-am-driver)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M600](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1028.7k5](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
