PHPackages                             ldaptools/ldaptools-bundle - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ldaptools/ldaptools-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

ldaptools/ldaptools-bundle
==========================

Provides easy LDAP integration for Symfony via LdapTools.

0.9.2(7y ago)49159.5k↓15.1%28[19 issues](https://github.com/ldaptools/ldaptools-bundle/issues)[3 PRs](https://github.com/ldaptools/ldaptools-bundle/pulls)MITPHP

Since Dec 25Pushed 3y ago3 watchersCompare

[ Source](https://github.com/ldaptools/ldaptools-bundle)[ Packagist](https://packagist.org/packages/ldaptools/ldaptools-bundle)[ Docs](http://github.com/ldaptools/LdapToolsBundle)[ RSS](/packages/ldaptools-ldaptools-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (13)Used By (0)

LdapToolsBundle [![Build Status](https://camo.githubusercontent.com/3723f7ab74014eae975e756165c16417a730d240b5d1b614dc07886cf5e09f49/68747470733a2f2f7472617669732d63692e6f72672f6c646170746f6f6c732f6c646170746f6f6c732d62756e646c652e737667)](https://travis-ci.org/ldaptools/ldaptools-bundle) [![AppVeyor Build Status](https://camo.githubusercontent.com/7b90d5a3f0662080f4eb11c54c0443e8f3e094457617d76b3d6b054a62c62b85/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f6769746875622f6c646170746f6f6c732f6c646170746f6f6c732d62756e646c653f6272616e63683d6d6173746572267376673d74727565)](https://ci.appveyor.com/project/ChadSikorra/ldaptools-bundle-td18j) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/6f38974edc5c9f9cbcbbd07f3f2ddc946681f0b20ac6c4c8b3fd78edac1c1aed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c646170746f6f6c732f6c646170746f6f6c732d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ldaptools/ldaptools-bundle/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/ec985b8ea7132944e9ed0e8f515d6437fb457fe45078ac762e813805ae0877ac/68747470733a2f2f706f7365722e707567782e6f72672f6c646170746f6f6c732f6c646170746f6f6c732d62756e646c652f762f737461626c652e737667)](https://packagist.org/packages/ldaptools/ldaptools-bundle)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#ldaptoolsbundle----)

---

The LdapToolsBundle provides easy integration of LDAP for Symfony via [LdapTools](https://github.com/ldaptools/ldaptools).

- An [LDAP authentication provider](/Resources/doc/LDAP-Authentication-Provider.md), including AdvancedUserInterface support.
- An [LDAP form type](/Resources/doc/LDAP-Object-Form-Type.md) to easily use LDAP objects in forms.
- An LDAP type for Doctrine to easily store and retrieve LDAP results in a Doctrine entity.
- Logging capabilities for LDAP operations.
- Web Debug Toolbar integration for LDAP operations.
- Integration of [LdapTools events](/Resources/doc/LDAP-Events.md) for LDAP operations (authentication, creation, modification, etc) using service tags.

**Note**: The LdapTools library requires PHP 5.6+.

### Installation

[](#installation)

The recommended way to install the LdapToolsBundle is using [Composer](http://getcomposer.org/download/):

```
composer require ldaptools/ldaptools-bundle
```

Then enable the bundle in the kernel:

```
// app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new LdapTools\Bundle\LdapToolsBundle\LdapToolsBundle(),
        );

        // ...
    }
}
```

### Getting Started

[](#getting-started)

After installing the bundle you can run the following command to assist in generating/testing your LDAP config:

```
# It will prompt for some basic questions (LDAP server, username/password to use, etc)
php bin/console ldaptools:generate:config
```

Adding your domain(s) to the `config.yml` file is as easy as the following example:

```
# app/config/config.yml
ldap_tools:
    domains:
        # The below "example" key can be anything you want. It just has to be a unique name for the YML config.
        example:
            # The LDAP FQDN is required
            domain_name: example.local
            # The username to use for the LDAP connection
            username: foo
            # The password to use for the username
            password: secret
            # The base DN for LDAP searches (queried from the RootDSE if not provided)
            base_dn: "dc=example,dc=local"
            # The LDAP servers to use for the connection (Queried from DNS if not provided)
            servers: ["dc1", "dc2", "dc3"]
        # Define another domain if you want
        foo:
            domain_name: foo.bar
            username: foo
            password: bar
            servers: ['dc1.foo.bar', 'dc2.foo.bar']
            base_dn: 'dc=foo,dc=bar'
```

Domain configuration options are also documented in the [LdapTools documentation](https://github.com/ldaptools/ldaptools/blob/master/docs/en/reference/Main-Configuration.md#domain-section).

Then in your controller you can use the `ldap_tools.ldap_manager` service to query/modify/create LDAP objects...

```
class DefaultController extends Controller
{
    public function indexAction()
    {
        $ldap = $this->get('ldap_tools.ldap_manager');

        $users = $ldap->buildLdapQuery()->fromUsers()->getLdapQuery()->getResult();

        $users->count();
        foreach ($users as $user) {
            $user->getFirstName();
            $user->getLastName();
            $user->getUsername();
        }

        # ...
    }
}
```

### Generate/Retrieve Your LDAP SSL Certificate

[](#generateretrieve-your-ldap-ssl-certificate)

If you want a quick way to retrieve your server's LDAP SSL certificate you can run a simple command to output it:

```
# Just supply your LDAP server name...
php bin/console ldaptools:generate:sslcert --server "servername"
```

### Documentation

[](#documentation)

- [Configuration Reference](/Resources/doc/Configuration-Reference.md)
- [LDAP Authentication Provider](/Resources/doc/LDAP-Authentication-Provider.md)
- [LDAP Authentication with the FOSUserBundle](/Resources/doc/LDAP-Authentication-With-The-FOSUserBundle.md)
- [Save LDAP Users to the Database After Login](/Resources/doc/Save-LDAP-Users-to-the-Database-After-Login.md)
- [LDAP Object Form Type](/Resources/doc/LDAP-Object-Form-Type.md)
- [LdapTools LDAP Events](/Resources/doc/LDAP-Events.md)
- [Bundle Events Reference](/Resources/doc/Bundle-Event-Reference.md)
- [LDIF Parser URL Loaders](/Resources/doc/LDIF-Parser-URL-Loaders.md)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

Recently: every ~74 days

Total

12

Last Release

2902d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/388229?v=4)[Chad Sikorra](/maintainers/ChadSikorra)[@ChadSikorra](https://github.com/ChadSikorra)

---

Top Contributors

[![ChadSikorra](https://avatars.githubusercontent.com/u/388229?v=4)](https://github.com/ChadSikorra "ChadSikorra (138 commits)")[![quentinus95](https://avatars.githubusercontent.com/u/8060564?v=4)](https://github.com/quentinus95 "quentinus95 (2 commits)")[![althaus](https://avatars.githubusercontent.com/u/105975?v=4)](https://github.com/althaus "althaus (2 commits)")[![rouet](https://avatars.githubusercontent.com/u/6275566?v=4)](https://github.com/rouet "rouet (1 commits)")[![alinalexandru](https://avatars.githubusercontent.com/u/2813842?v=4)](https://github.com/alinalexandru "alinalexandru (1 commits)")[![yannick2577](https://avatars.githubusercontent.com/u/19346450?v=4)](https://github.com/yannick2577 "yannick2577 (1 commits)")[![eduardluft](https://avatars.githubusercontent.com/u/16938444?v=4)](https://github.com/eduardluft "eduardluft (1 commits)")[![meons](https://avatars.githubusercontent.com/u/5362939?v=4)](https://github.com/meons "meons (1 commits)")

---

Tags

ldapsymfony-bundleldapactive directoryopenldapMicrosoft Exchange

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ldaptools-ldaptools-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ldaptools-ldaptools-bundle/health.svg)](https://phpackages.com/packages/ldaptools-ldaptools-bundle)
```

###  Alternatives

[ldaptools/ldaptools

LdapTools is a feature-rich LDAP library for PHP 5.6+.

204263.9k1](/packages/ldaptools-ldaptools)[causal/ig_ldap_sso_auth

This extension provides LDAP support for TYPO3 by delegating the authentication of frontend and/or backend users to the centrally-managed directory of your organization. It fully supports OpenLDAP and Active Directory and is capable of connecting securely to the authentication server using either TLS or SSL (ldaps://). In case of use in an intranet environment, this extension is a perfect match since it natively brings Single Sign-On (SSO) capability to TYPO3 without any complex configuration.

33377.4k](/packages/causal-ig-ldap-sso-auth)[jotaelesalinas/laravel-adminless-ldap-auth

Authenticate users in Laravel against an adminless LDAP server

2105.1k](/packages/jotaelesalinas-laravel-adminless-ldap-auth)[chrmorandi/yii2-ldap

Ldap

1453.1k](/packages/chrmorandi-yii2-ldap)[edvlerblog/yii2-adldap-module

yii2 Active Directory implementation (wrapper for Adldap2)

51227.3k](/packages/edvlerblog-yii2-adldap-module)[riper/security-active_directory

This is a bundle to allow authentication into symfony &gt;= 2.6 by an Active directory

163.7k](/packages/riper-security-active-directory)

PHPackages © 2026

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