PHPackages                             ltb-project/ldap - 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. [Framework](/categories/framework)
4. /
5. ltb-project/ldap

Abandoned → [ltb-project/ltb-common](/?search=ltb-project%2Fltb-common)Library[Framework](/categories/framework)

ltb-project/ldap
================

PHP framework for LTB project applications

v0.6.2(5mo ago)31.4k4[1 issues](https://github.com/ltb-project/ltb-common/issues)[2 PRs](https://github.com/ltb-project/ltb-common/pulls)GPL-3.0-or-laterPHPPHP &gt;=7.4CI passing

Since Jan 23Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/ltb-project/ltb-common)[ Packagist](https://packagist.org/packages/ltb-project/ldap)[ RSS](/packages/ltb-project-ldap/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (22)Used By (0)

LDAP Tool Box PHP framework
===========================

[](#ldap-tool-box-php-framework)

[![Latest Stable Version](https://camo.githubusercontent.com/c8e7ba9a87cb8eb5123cd22b98d08963ec3bc75d2a525022de706b95a2464d22/68747470733a2f2f706f7365722e707567782e6f72672f6c74622d70726f6a6563742f6c74622d636f6d6d6f6e2f76)](https://packagist.org/packages/ltb-project/ltb-common)[![Total Downloads](https://camo.githubusercontent.com/ce4981e23830e08bcbd9c543382b810bc798fa3e8ad8b7870ceb90df19d8ce27/68747470733a2f2f706f7365722e707567782e6f72672f6c74622d70726f6a6563742f6c74622d636f6d6d6f6e2f646f776e6c6f616473)](https://packagist.org/packages/ltb-project/ltb-common)[![CI Status](https://github.com/ltb-project/ltb-common/actions/workflows/unittests.yml/badge.svg)](https://github.com/ltb-project/ltb-common/actions/workflows/unittests.yml)[![Composer Status](https://github.com/ltb-project/ltb-common/actions/workflows/php.yml/badge.svg)](https://github.com/ltb-project/ltb-common/actions/workflows/php.yml)

Presentation
------------

[](#presentation)

This is a PHP library to share code between LTB applications like [Self Service Password](https://github.com/ltb-project/self-service-password), [White Pages](https://github.com/ltb-project/white-pages), [Service Desk](https://github.com/ltb-project/service-desk), ...

Installation
------------

[](#installation)

Add the dependency in your [composer](https://getcomposer.org/) configuration:

```
{
    "require": {
        "ltb-project/ltb-common": "v0.2.1"
    }
}
```

Then update dependencies:

```
composer update

```

Use autoloading in your code to load composer dependencies:

```
require __DIR__ . 'vendor/autoload.php';
```

Usage
-----

[](#usage)

### LDAP connection

[](#ldap-connection)

```
$ldap_url = "ldap://ldap.example.com";
$ldap_starttls = false;
$ldap_binddn = "cn=admin,dc=example,dc=com";
$ldap_bindpw = "secret";
$ldap_network_timeout = 3;
$ldap_user_base = "ou=people,dc=example,dc=com";
$ldap_size_limit = -1;
$ldap_krb5ccname = null;
$ldap_page_size = 1000;

$ldapInstance = new \Ltb\Ldap(
        $ldap_url,
        $ldap_starttls,
        $ldap_binddn,
        $ldap_bindpw,
        $ldap_network_timeout,
        $ldap_user_base,
        $ldap_size_limit,
        $ldap_krb5ccname,
        $ldap_page_size
);

$ldap_connection = $ldapInstance->connect();

$ldap = $ldap_connection[0];
$result = $ldap_connection[1];

if (!$result) {
    error_log("Unable to connect to $ldap_url");
    exit 1;
}
```

Tests
-----

[](#tests)

### Unit tests

[](#unit-tests)

Get composer dependencies:

```
composer update

```

Run the tests:

```
vendor/bin/phpunit tests/Ltb

```

If you want coverage analysis, make sure to install `xdebug` PHP extension, and run:

```
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --configuration phpunit.xml

```

### Integration tests

[](#integration-tests)

Make sure you have docker or podman installed

Get composer dependencies:

```
composer update

```

Run the tests (requires an internet connection for donwloading the openldap docker image):

```
./runIntegrationTests.sh

```

If you already have an openldap server, you can also adapt the tests in tests/ directory, and run them with:

```
vendor/bin/phpunit tests/IntegrationTests

```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance73

Regular maintenance activity

Popularity25

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

Recently: every ~84 days

Total

15

Last Release

168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f2989321026a9a1c6af575c6857150a7554c614435d127f6aa8cbb5ec04304b?d=identicon)[coudot](/maintainers/coudot)

---

Top Contributors

[![coudot](https://avatars.githubusercontent.com/u/883396?v=4)](https://github.com/coudot "coudot (71 commits)")[![philhaworteks](https://avatars.githubusercontent.com/u/150656883?v=4)](https://github.com/philhaworteks "philhaworteks (21 commits)")[![abpai94](https://avatars.githubusercontent.com/u/24610121?v=4)](https://github.com/abpai94 "abpai94 (2 commits)")[![artlog](https://avatars.githubusercontent.com/u/2937393?v=4)](https://github.com/artlog "artlog (1 commits)")[![LaurinStreng](https://avatars.githubusercontent.com/u/98621415?v=4)](https://github.com/LaurinStreng "LaurinStreng (1 commits)")

---

Tags

composerldapphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ltb-project-ldap/health.svg)

```
[![Health](https://phpackages.com/badges/ltb-project-ldap/health.svg)](https://phpackages.com/packages/ltb-project-ldap)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[getkirby/cms

The Kirby core

1.5k535.5k352](/packages/getkirby-cms)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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