NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #1948 most downloaded on Packagist
A fully-featured LDAP ORM.
Latest stable
v4.1.1
Last release 1 months ago
08 Oct 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
175 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Bump tighteco/collect support to v9.0
PHP 7.3 compatibility - #537 - https://github.com/DirectoryTree/LdapRecord/commit/c0b468f3ac56656c9dba012cc88f8336f9ee359c
PHP 8.1 str_contains() with null value warning - #530
str_contains() with null value warning - #530Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add ability to filter relations based on related object classes via $model->relation()->onlyRelated() - https://github.com/DirectoryTree/LdapRecord/pu
$model->relation()->onlyRelated() - https://github.com/DirectoryTree/LdapRecord/pull/517Timestamp::convertWindowsTimeToDateTime() returns wrong timezone for UTC time - https://github.com/DirectoryTree/LdapRecord/pull/519Ability to count() model relationships via $model->relation()->count() - d28674a2fb82c844e50b4a5e3fc9f87ca4c64c4d
count() model relationships via $model->relation()->count() - d28674a2fb82c844e50b4a5e3fc9f87ca4c64c4dModel events will now be properly dispatched when calling: - #510, #508
$model->createAttribute()$model->updateAttribute()$model->deleteAttribute()Properly set the LDAP batch modification type of password when user does not exist - https://github.com/DirectoryTree/LdapRecord/pull/506
PHP 8.1 strict types bug with html_entity_decode when attempting to bind with a null password - https://github.com/DirectoryTree/LdapRecord/discussion
html_entity_decode when attempting to bind with a null password - https://github.com/DirectoryTree/LdapRecord/discussions/503ActiveDirectory\User model methods isEnabled() and isDisabled() methods to determine enablement
ActiveDirectory\User model methods isEnabled() and isDisabled() methods to determine enablement
ActiveDirectory\User model method accountControl() to easily retrieve an AccountControl object populated with the user's userAccountControl value
Ability to chunk relations recursively (i.e. $user->groups()->recursive()->chunk($callback)) - https://github.com/DirectoryTree/LdapRecord/pull/474
$user->groups()->recursive()->chunk($callback)) - https://github.com/DirectoryTree/LdapRecord/pull/474Models\Collection::modelDns() method to easily fetch all of the model's Distinguished Name's inside of a model collection
modelKeys() method - https://github.com/DirectoryTree/LdapRecord/pull/474HasMany::each($callback) method to easily iterate through each result of a chunked relation query via callback - https://github.com/DirectoryTree/LdapRecord/pull/474Unserialized model attributes will now be properly restored to their original values prior to serialization - #457 - #471
Live integration tests using OpenLDAP docker image - 4ff5385ed20f9768a24c6887abf49812ebe2f76d
DirectoryServer model type interface - dbb69613fcf1cccad7a2aa65008b120e8a56d3e9ActiveDirectory\Entry::getRootDse() method has been moved to base Model class - 32cb3797c34bab4c6c4e4bdd180aae03ae0038d3$objectClasses if the objectclass attribute is not present - 4e7717bb8037061e69e210e61a23fa5f79ee1005Parser will now always return an array of nodes instead of single GroupNode's - 076591b3e8c44f8565ec80ca0b9d822f4f344474Parser will now trim unneeded white space in parsed nodes - 0c6d833e60bed24a19c51de89f81fcdd2d5a760eParser can now parse multiple root filter nodes - 58cc38f53c32813679a7bd0fd08065b728b59d5bLDAP Filter Parser - https://github.com/DirectoryTree/LdapRecord/pull/438
symfony/polyfill-php80 for some PHP 8 only functions to maintain BC with PHP 7.4Model serialization with json_encode - https://github.com/DirectoryTree/LdapRecord/pull/430
json_encode - https://github.com/DirectoryTree/LdapRecord/pull/430$model->originalToArray() method for retrieving a json_encode'able array of a model's original attributes - https://github.com/DirectoryTree/LdapRecord/pull/430Use correct key to retrieve total count of results in Query::slice() - https://github.com/DirectoryTree/LdapRecord/pull/420 - Thanks to @KarimGeiger
Query::slice() - https://github.com/DirectoryTree/LdapRecord/pull/420 - Thanks to @KarimGeigerQuery\Builder::slice($page = 1, $perPage = 100) method
Query\Builder::slice($page = 1, $perPage = 100) method
Query\Builder::forPage($page = 1, $perPage = 100) method
Query\Builder::clone() method - 1f26eb95397c268e41d4765c268bed95f162613a...1ac0c94fa819c0de3176d886ce7cbf6f1cbc0252
Ability to supply callbacks into fake LdapExpectation arguments
Properly update cookie when paginating - bf512d9af7a7b0e2ed7a666ab29cefdd027bee88 - #411
Ability to sort search results server side via User::orderBy('cn')->get() - #401
User::orderBy('cn')->get() - #401Laravel 9 Support - https://github.com/DirectoryTree/LdapRecord/pull/396
Continue pagination in circumstances where the cookie is zero (0) - a7911ff524796f032fe88482df2bdb09fed9f0f0 - https://github.com/DirectoryTree/LdapRe
0) - a7911ff524796f032fe88482df2bdb09fed9f0f0 - https://github.com/DirectoryTree/LdapRecord/issues/388Further PHP 8.1 type issue fixes - 53d723ffc62830c62e42cdffef6ac361c958e213 - Thanks to @villfa
Ldap\Result for PHP 8.1 - ac60a14d4d2b4041b9f98c610ba58fc26ec0487e - Thanks to @villfaRemaining PHP 8.1 deprecations - b71bd14...2bfb57b - https://github.com/DirectoryTree/LdapRecord/pull/364
getAttribute(), getFirstAttribute() methods - b71bd1470102efa3472c92ab13406cf88fec35fc - https://github.com/DirectoryTree/LdapRecord/pull/364Distinguished names are now properly set when using $model->fill() or $model->dn = $dn - https://github.com/DirectoryTree/LdapRecord/pull/356 - #354 -
$model->fill() or $model->dn = $dn - https://github.com/DirectoryTree/LdapRecord/pull/356 - #354 - f95ba8d05688612ead479aae1a7c9b80be7cce25$model->setRawAttribute($key, $value) method - 90210e08415e1739e515945e13e651c5da2e00a0setDnAttribute($dn) and setDistinguishedNameAttribute($dn) mutators on Model - f95ba8d05688612ead479aae1a7c9b80be7cce25Model::make($attributes) static method for fluently creating model instances - f95ba8d05688612ead479aae1a7c9b80be7cce25$user->isLockedOut() can now accept only a duration in minutes, without a timezone (i.e. $user->isLockedOut(30))
Models\ActiveDirectory\User: https://github.com/DirectoryTree/LdapRecord/pull/346$user->isLockedOut() can now accept only a duration in minutes, without a timezone (i.e. $user->isLockedOut(30))Model: https://github.com/DirectoryTree/LdapRecord/pull/346rename() now allows a string instead of requiring an RDN (i.e. cn=John Doe)saveQuietly() allows you to save a model without firing any events (create/update)Query\Builder: https://github.com/DirectoryTree/LdapRecord/pull/346each() method allows you to execute a callback over individual objects in a chunked querychunk() can now be aborted by returning false in a chunkfirstOr() - execute a callback if there are no results from a querysole() - return the first result from a query, but throw an exception if there are multiple objects or no objects foundexists() - determine if the query contains any resultsdoesntExist() - determine if the query does not contain any resultsexistsOr() - execute a callback if the query does not contain any resultsDistinguishedName: https://github.com/DirectoryTree/LdapRecord/pull/346isValid static method to DistinguishedName (DistinguishedName::isValid())isEmpty method to DistinguishedName (DistinguishedName::make()->isEmpty())Allow any version of PSR Log - #343 - facd1f5
LdapRecord\Models\Model now implements Illuminate\Contracts\Support\Arrayable interface
LdapRecord\Models\Model now implements Illuminate\Contracts\Support\Arrayable interface
LdapRecord\Models\Model::toArray() method for retrieving the arrayable attributes of the model
LdapRecord\Models\Attributes\EscapedValue::raw() method for easily retrieving the raw value from the EscapedValue instance
ActiveDirectory\User::whereHasLockout() built-in model scope
ActiveDirectory\User::isLockedOut() method to determine if a user is locked out depending on group policy lockout duration
User models
deleteLeafNodes() query to use chunking instead of pagination
Properly log query base DN when logging executed queries - 917a27e
Determine secure connection using LDAP configuration, if not connected, when attempting to check if the LDAP connection has SSL or TLS enabled. Previo
Infinite loop encountered by circular LDAP relationships - 37253d8 - https://github.com/DirectoryTree/LdapRecord/issues/319
Configure ConnectionFake's so LDAP options are properly applied - 5c13dcd - https://github.com/DirectoryTree/LdapRecord-Laravel/issues/331
ConnectionFake's so LDAP options are properly applied - 5c13dcd - https://github.com/DirectoryTree/LdapRecord-Laravel/issues/331getObjectGuidKey() method to Model - 9d00e32multi(), rdns() and head() methods to DistinguishedName helper - 1d02feagetHead() method to Model for easily retrieving the models first RDN's attribute name - c9476dcProperly proxy DistinguishedNameBuilder arguments to base DistinguishedName instance - 682f8b1
DistinguishedNameBuilder arguments to base DistinguishedName instance - 682f8b1Container connection management into a ConnectionManager - ec8c3a0Ldap and LdapInterface code doc errors - #310 - 8eea3b3
Ldap and LdapInterface code doc errors - #310 - 8eea3b3HasMany relation causing exceptions in PHP 8 - f40e428Accidental breaking change with integer configuration validation causing Option [port] must be an integer - e8ac79c
Option [port] must be an integer - e8ac79cRemove deprecated PHP 7.2 LDAP method usage omitting the $serverControls parameter - 6c9e8a1
$serverControls parameter - 6c9e8a1DomainConfiguration validators - 39622cdLdapBase into a trait - d3cbf82Deprecate DeprecatedPaginator class - 8606b8d
DeprecatedPaginator class - 8606b8dLdap::supportsServerControlsInMethods() method - 8606b8dUser::chunk(500, fn() => {}) - 8606b8dQuery\Events\Chunk event fired when running $query->chunk() operations - 8606b8d$model->getObjectClasses() - 55bcde6Query filters that are logged with now be escaped to prevent issues in logging software - 24c2fdd - #293
Ability to delete multiple attributes with an array of strings via $model->deleteAttribute(['foo', 'bar']) - 443be902a44bbf58b264fe16685c5f1e78e5a9c3
$model->deleteAttribute(['foo', 'bar']) - 443be902a44bbf58b264fe16685c5f1e78e5a9c3 - #291Ensure connections are initialized prior to any authentication attempts - 88c4a6a, c9be953, 89766ed - #278
Initialize LDAP connection during connection attempt, rather than upon Connection creation
Connection creation
Model::toJson() method for easily encoding a model instance to JSON - ed79f7f
Model::toJson() method for easily encoding a model instance to JSON - ed79f7fDistinguishedNameBuilder::components() method for easily retrieving all of a built DN's components - 4da52bfPrevent exception from being thrown in the case when the cookie is not set in the query controls - 4fdd4d6 - #265, #266
$appends feature from Eloquent - 611bc52 - #267Properly unescape and re-escape Distinguished Name attribute values when performing move()'s and rename()'s - 297eeed - #253
move()'s and rename()'s - 297eeed - #253UserAccountControl flags via the AccountControl::getAppliedFlags() method - 5da929c - #263DistinguishedName class: - 297eeed
DistinguishedName::explode()DistinguishedName::explodeRdn()DistinguishedName::makeRdn()DistinguishedName::unescape()Add ability to pass in RDN's or components into append() and prepend() DN builder methods - 6fa3565
append() and prepend() DN builder methods - 6fa3565Bump minimum tightenco/collect to v5.6 - #255 - 3a57677, f009c29
tightenco/collect to v5.6 - #255 - 3a57677, f009c29getCreatableDn() and getCreatableRdn() methods - ea65785Builder:: whereNotMemberof()Builder::orWhereNotMemberof()Builder::whereNotManager()Builder::orWhereNotManager()Utilize Model::getConnectionName() internally so it can be overridden - 71340de
Model::getConnectionName() internally so it can be overridden - 71340deEnsure cache is set on all model query builders - 21b5552
Ensure model scopes don't impact fresh/refresh of models - #249 - 7c630b8
Failed to create paged result control value - #251 - c04cfd0
Accidental breaking change with static Container::getEventDispatcher() and Container::setEventDispatcher() methods being updated to non-static
Container::getEventDispatcher() and Container::setEventDispatcher() methods being updated to non-static
Paginator and DeprecatedPaginator query classes
Prevent executing an LDAP rename request when a given relative distinguished name is the same as the current
Ability to apply exceptions and errors to an LDAP expectations - 6dbd3bd
Connection based events API realigned with Auth events - ad3a6c1
Connection based events API realigned with Auth events - ad3a6c1Initial connection attempts will now be retried if multiple hosts are configured - #236 - 1c850bf
LdapRecord\LdapInterface - 6e6bb07, bda6c7eConnection events granting the ability to hook into the connection lifecycle: - 29e5a95
LdapRecord\Events\ConnectedLdapRecord\Events\ConnectingLdapRecord\Events\ConnectionFailedLdapRecord\Testing\LdapFake's now support adding method expectations, granting a much better test experience - f284bee, bcc8a71Automatically retry connecting to subsequent LDAP hosts if initial connections fail - #236 - 063dabf
Revert use of static instances for Container::$logger and Container::$dispatcher - f055f17
Container::$logger and Container::$dispatcher - f055f17Container::flush() method for resetting the current container instance - f055f17DirectoryFake::tearDown() for resetting the Container instance during unit tests - f055f17, 41048fbLDAP logging - https://github.com/DirectoryTree/LdapRecord-Laravel/issues/228 - 34d9253
Deleting non-leaf nodes/objects will now property delete all leaf nodes/objects of different types - 4851167
https://ldaprecord.com/docs/core/v2/upgrading/
https://ldaprecord.com/docs/core/v2/upgrading/
$sync parameter for the following Model methods:
Model::createAttribute()Model::updateAttribute()Model::deleteAttribute()Model::asDateTime() parameter order swapped - 1ce30dcHasLogger and DispatchesEvents traits with Container - 1dc01edModel::synchronize() renamed to Model::refresh() - 62dc51dModel::refresh() must now be done manually if needed. This was done to make operations more performant - 62dc51d - #192ObjectNotFoundException is now thrown when using orFail() methods on raw Connection queries.
ModelNotFoundException now extends ObjectNotFoundException - 0177c4fLdapRecordException upon failure - 8355c48 - #186
Model methods now no longer return any value (void):
Model::save()Model::update()Model::delete()Model::createAttribute()Model::updateAttribute()Model::deleteAttribute()Model::rename()Model::move()Relation::exists() and Relation::contains() methods into new query collection: Models\Collection
exists() and contains() on any resulting model collection - 4fbe6e5Model::deleteAttribute() - 5faca5aAccountControl::filter() - 05fb42cDomainConfiguration with custom options via DomainConfiguration::extend() - 8f96bbe - #207Container - 879d426OpenLDAP\User::groups() relationship - 942cb48 - https://github.com/DirectoryTree/LdapRecord-Laravel/issues/217Ensure cache is set on all model query builders - b5f54bf
Accidental breaking change with static Container::getEventDispatcher() and Container::setEventDispatcher() methods being non-static - #244 - be75c0c
Container::getEventDispatcher() and Container::setEventDispatcher() methods being non-static - #244 - be75c0cOne column per quarter.