PHPackages                             logipro/captain-learning-php - 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. [API Development](/categories/api)
4. /
5. logipro/captain-learning-php

ActiveLibrary[API Development](/categories/api)

logipro/captain-learning-php
============================

Client PHP for Captain Learning API

v0.0.4(4mo ago)0161[2 PRs](https://github.com/logipro-fr/captain-learning-php/pulls)MITPHPPHP 7.4.\*

Since Oct 28Pushed 3mo agoCompare

[ Source](https://github.com/logipro-fr/captain-learning-php)[ Packagist](https://packagist.org/packages/logipro/captain-learning-php)[ Docs](https://github.com/logipro-fr/captain-learning-php)[ RSS](/packages/logipro-captain-learning-php/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (4)Dependencies (10)Versions (10)Used By (0)

Captain Learning PHP
====================

[](#captain-learning-php)

Client PHP for Captain Learning API

Install
-------

[](#install)

```
composer require logipro/captain-learning-php
```

Usage
-----

[](#usage)

### 1. Initialisation

[](#1-initialisation)

Disposer d'une clé API et d'un ID de clé API valides Configurer l'URL de base pour se connecter à l'API Captain Learning

```
$apiKeyId = "cl_apk_690b25988d814d2b";
$apiKey = "sk_7a5f1b27ad33f4b6455ce8f96ca90bf2";
$url = 'http:monsite.fr';
$tenantId = "mon_tenantId"
```

### 2. Faire une instance du client

[](#2-faire-une-instance-du-client)

```
$client = new CaptainLearningClient(
    $apiKeyId,
    $apiKey,
    $url,
    $tenantId
);
```

### 3. Créer une formation

[](#3-créer-une-formation)

```
$formation = new FormationCreateRequest(
    'Nom de la formation',
    'Id de la formation',
    );

$client->createFormation($formation);
```

Contributing
------------

[](#contributing)

### Install

[](#install-1)

```
git clone https://github.com/logipro-fr/captain-learning-php
cd captain-learning-php
./install --profile devlocal
```

### Requirements

[](#requirements)

- docker
- git

### Add a .env.local file

[](#add-a-envlocal-file)

To install locally or on a development server, be careful with the following environment variables:

- DATA\_PATH: path where data is stored; must be inside the project (default: ./data)
- DATA\_PATH\_STORE: path for backups; generally outside the project (default: ../data/chatbot-php)
- REMOVE\_DATABASE\_WHEN\_INSTALL: remove database during install (default: false)
- BUILD\_WHEN\_INSTALL: build application during install (default: false)
- DOCKER\_DEV: run development-specific containers (default: false)
- DOCKER\_PHP\_BUILT\_IMAGE: application prebuilt Docker image
- OPTIONAL\_VOLUME: mount a local volume for localhost development (default: empty)
- LOCALDEV\_WORKING\_DIR: working directory useful for development (default: undefined)
- URL\_API: override the base URL used by internal API clients (default: empty)
- PULL\_POLICY: policy for pulling the PHP built image on start (default: missing)

Typical local development .env.local:

```
DATA_PATH=./data
REMOVE_DATABASE_WHEN_INSTALL=true
BUILD_WHEN_INSTALL=true
DOCKER_DEV=true
OPTIONAL_VOLUME=.:/var/chatbot-php
LOCALDEV_WORKING_DIR=true
URL_API=http://nginx
PULL_POLICY=never

```

Typical server development .env.local:

```
DATA_PATH=../data
REMOVE_DATABASE_WHEN_INSTALL=true
DOCKER_DEV=true
DOCKER_PHP_BUILT_IMAGE=
URL_API=https://dev.your-app.tld

```

For production and pre-production, a .env.local MUST NOT exist because default variables target the production environment. However, this project includes a frontend that calls the API, so in pre-production you need a .env.local to override `URL_API`.

Typical pre-production .env.local:

```
URL_API=https://preprod.your-app.tld

```

Tests
-----

[](#tests)

### Unit tests

[](#unit-tests)

```
bin/phpunit
```

We use Test-Driven Development (TDD) principles and good practices.

### Integration tests

[](#integration-tests)

Integration tests are all test categories other than unit tests.

```
bin/integration
```

### Acceptance tests

[](#acceptance-tests)

Acceptance tests are integration tests that verify the application against feature specifications. Gherkin is the specification language; Behat is the PHP runner.

```
bin/behat
```

Manual tests
------------

[](#manual-tests)

```
./start
```

Then open 172.17.0.1:35080/ in your browser.

```
./stop
```

Quality
-------

[](#quality)

Some indicators we aim for:

- phpcs PSR12
- phpstan level 10
- coverage &gt;=100%
- infection MSI &gt;=100%

Quick check:

```
./codecheck
```

Check coverage:

```
bin/phpunit --coverage-html var
```

Then open `var/index.html` in your browser.

Check infection:

```
bin/infection
```

Then open `var/infection.html` in your browser.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance78

Regular maintenance activity

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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 ~16 days

Total

4

Last Release

147d ago

### Community

Maintainers

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

---

Top Contributors

[![Duruti](https://avatars.githubusercontent.com/u/50047328?v=4)](https://github.com/Duruti "Duruti (3 commits)")[![frederic100](https://avatars.githubusercontent.com/u/50176793?v=4)](https://github.com/frederic100 "frederic100 (1 commits)")

---

Tags

phpDDT

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/logipro-captain-learning-php/health.svg)

```
[![Health](https://phpackages.com/badges/logipro-captain-learning-php/health.svg)](https://phpackages.com/packages/logipro-captain-learning-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

9230.2k4](/packages/bitrix24-b24phpsdk)[ezsystems/allure-php-api

PHP API for Allure adapter

13431.1k11](/packages/ezsystems-allure-php-api)[mjaschen/collmex

Collmex PHP SDK

2080.7k](/packages/mjaschen-collmex)[afiqiqmal/malaysiaholiday

to get all holidays date in malaysia

329.0k](/packages/afiqiqmal-malaysiaholiday)

PHPackages © 2026

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