NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1917 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.
Include search bases and controls in query cache keys - https://github.com/DirectoryTree/LdapRecord/pull/822
OpenLDAP Argon2 password support and a new User::changePassword() method for self-service password changes - https://github.com/DirectoryTree/LdapReco
User::changePassword() method for self-service password changes - https://github.com/DirectoryTree/LdapRecord/pull/809Your coding agent can read these notes before it upgrades. Set up the MCP server →
PHP 8.5 ReflectionProperty deprecations by @RadioTrista - https://github.com/DirectoryTree/LdapRecord/pull/812
Auth: allow zero string credentials by @tbasten - https://github.com/DirectoryTree/LdapRecord/pull/810
Global scope query mutations - https://github.com/DirectoryTree/LdapRecord/pull/806
Nested filter grouping regression - https://github.com/DirectoryTree/LdapRecord/pull/805
Fix date attributes producing invalid UNIX timestamps on 32-bit PHP - https://github.com/DirectoryTree/LdapRecord/pull/803
Add laravel 13 support by @felipereisdev - https://github.com/DirectoryTree/LdapRecord/pull/796
Align model query builder filter behaviour with root query builder - https://github.com/DirectoryTree/LdapRecord/pull/793
Corrected select behaviour to align with v3 - https://github.com/DirectoryTree/LdapRecord/pull/792
orFilter/andFilter behaviour to align with v3 when given nested clauses - https://github.com/DirectoryTree/LdapRecord/pull/791https://ldaprecord.com/docs/core/v4/release-notes
https://ldaprecord.com/docs/core/v4/release-notes
https://ldaprecord.com/docs/core/v4/upgrading
We're excited to announce the release of LdapRecord v4.0.0! This major version introduces significant improvements to the query filter system, clearer SSL/TLS configuration naming, and better separation of concerns between the query and model builders.
The SSL and TLS configuration options have been renamed to more accurately reflect their purpose:
use_ssl is now use_tls - Uses the ldaps:// protocol (port 636)
use_tls is now use_starttls - Uses the ldap:// protocol with STARTTLS upgrade (port 389)
The previous naming was confusing because use_ssl actually enabled TLS via the ldaps:// protocol, while use_tls enabled STARTTLS. The new names make this distinction clear.
The query filter system has been completely rewritten to use dedicated filter objects instead of arrays and a grammar class. This provides a more intuitive and type-safe way to work with LDAP filters.
New Filter Classes:
Class Description Example
Equals Exact match (cn=John)
Contains Substring match (cn=John)
StartsWith Prefix match (cn=John*)
EndsWith Suffix match (cn=*Doe)
Has Attribute presence (cn=*)
GreaterThanOrEquals Greater than or equal (age>=18)
LessThanOrEquals Less than or equal (age<=65)
ApproximatelyEquals Approximate match (cn~=John)
AndGroup AND group (&(cn=John)(sn=Doe))
OrGroup OR group (|(cn=John)(cn=Jane))
Not Negation (!(cn=John))
Raw Raw filter string Any valid filter
All condition filters implement the ConditionFilter interface, and all group filters implement the GroupFilter interface, making it easy to work with parsed filters programmatically.
The where and orWhere methods now accept closures as the first argument for nested queries, providing a more intuitive way to build complex filters:
User :: query () -> where ( function ($query) { $query -> where ( 'cn' , '=' , 'John' ) -> orWhere ( 'cn' , '=' , 'Jane' ) ; } ) -> get () ; Copy Copied!
The Model\Builder class no longer extends Query\Builder . Instead, it uses composition, delegating query operations to an underlying Query\Builder instance. This provides:
Better separation of concerns
Clearer APIs for each builder type
More predictable behavior when extending builders
You can access the underlying query builder using getQuery() or toBase() methods.
Parameter names have been standardized throughout the codebase to better align with LDAP terminology:
$fields is now $attributes
$columns is now $selects
The filter parser now returns typed filter objects instead of generic node classes:
use LdapRecord \ Query \ Filter \ Parser ; $filters = Parser :: parse ( '(&(cn=Steve)(sn=Bauman))' ) ; $group = $filters[ 0 ]; // AndGroup instance $group -> getOperator () ; // "&" $group -> getFilters () ; // [Equals, Equals] Copy Copied!
For detailed upgrade instructions, please see the upgrade guide .
Laravel 13 compatibility for v3.0 - https://github.com/DirectoryTree/LdapRecord/pull/798
Properly return no results when ->whereIn() is called on query builder with an empty array - https://github.com/DirectoryTree/LdapRecord/pull/783
->whereIn() is called on query builder with an empty array - https://github.com/DirectoryTree/LdapRecord/pull/783Rounding error when retrieving timestamp from Active Directory #779
Reset LDAP connection secure flag on close() - #774 - #776
secure flag on close() - #774 - #776{base} inside ActiveDirectoryBuilder::whereMemberOf doesn't work - https://github.com/DirectoryTree/LdapRecord/pull/767
Fixed
{base} inside ActiveDirectoryBuilder::whereMemberOf doesn't work - https://github.com/DirectoryTree/LdapRecord/pull/767Properly override query limit to 0 when chunking - https://github.com/DirectoryTree/LdapRecord/pull/762
0 when chunking - https://github.com/DirectoryTree/LdapRecord/pull/762Test on PHP 8.4 - 86c95c46862a525169a3d9b57db180027ff09bf1
Ensure model attribute values are numerically indexed upon creation - https://github.com/DirectoryTree/LdapRecord/pull/756
Support for LDAP milliseconds format when using the ldap timestamp type - https://github.com/DirectoryTree/LdapRecord/pull/750 - Thanks to @ishanvyas2
ldap timestamp type - https://github.com/DirectoryTree/LdapRecord/pull/750 - Thanks to @ishanvyas22Infinite loop in LdapRecord\Models\Collection::contains method - https://github.com/DirectoryTree/LdapRecord/pull/747
LdapRecord\Models\Collection::contains method - https://github.com/DirectoryTree/LdapRecord/pull/747LdapRecord\Query\Builder::orderBy - https://github.com/DirectoryTree/LdapRecord/pull/748CanAuthenticate::getAuthIdentifier method for better Laravel 11 support when using a custom User LdapRecord model - 74ad340
CanAuthenticate::getAuthIdentifier method for better Laravel 11 support when using a custom User LdapRecord model - 74ad340Query Builder hasSelects() fails when no selects have been added - #742 - 207c727
hasSelects() fails when no selects have been added - #742 - 207c727## Added - LDAP_DEBUG constants: - Ldap::DEBUG_TRACE - Ldap::DEBUG_PACKETS - Ldap::DEBUG_ARGS - Ldap::DEBUG_CONNS - Ldap::DEBUG_BER - Ldap::DEBUG_FILT
Ldap::DEBUG_TRACELdap::DEBUG_PACKETSLdap::DEBUG_ARGSLdap::DEBUG_CONNSLdap::DEBUG_BERLdap::DEBUG_FILTERLdap::DEBUG_CONFIGLdap::DEBUG_ACLLdap::DEBUG_STATSLdap::DEBUG_STATS2Ldap::DEBUG_SHELLLdap::DEBUG_PARSELdap::DEBUG_SYNCLdap::DEBUG_REFERRALLdap::DEBUG_ERRORLdap::DEBUG_ANYThrow RuntimeException when a date cast has been formatted incorrectly instead of Undefined array key - b82df10 - #738
RuntimeException when a date cast has been formatted incorrectly instead of Undefined array key - b82df10 - #738Ability to set custom LDAP protocol in configuration via new protocol option - https://github.com/DirectoryTree/LdapRecord/pull/733
protocol option - https://github.com/DirectoryTree/LdapRecord/pull/733Properly flush Container on DirectoryFake::tearDown - https://github.com/DirectoryTree/LdapRecord/pull/716
Container on DirectoryFake::tearDown - https://github.com/DirectoryTree/LdapRecord/pull/716Reverse boolean casts now properly accept LDAP string booleans - https://github.com/DirectoryTree/LdapRecord/pull/715
Attribute casts now work correctly while setting attributes instead of only getting attributes - https://github.com/DirectoryTree/LdapRecord/pull/712
Include BindException to Failed authentication event for additional debugging information - https://github.com/DirectoryTree/LdapRecord/pull/709
BindException to Failed authentication event for additional debugging information - https://github.com/DirectoryTree/LdapRecord/pull/709list Builder query type, and add Builder constants for each possible query type - https://github.com/DirectoryTree/LdapRecord/pull/696
list Builder query type, and add Builder constants for each possible query type - https://github.com/DirectoryTree/LdapRecord/pull/696ldap_start_tls(): Unable to start TLS: Local error - Properly track TLS upgraded state - https://github.com/DirectoryTree/LdapRecord/pull/704allow_insecure_password_changes - https://github.com/DirectoryTree/LdapRecord/pull/701Decoding problem with UTF-8 strings with serialization - #698 - 8c12bbe324be9510cbfdce02e11bf601b2670b97
Laravel 11 compatibility - https://github.com/DirectoryTree/LdapRecord/pull/697
orWhere cannot be called without an operator specified - https://github.com/DirectoryTree/LdapRecord/pull/690
orWhere cannot be called without an operator specified - https://github.com/DirectoryTree/LdapRecord/pull/690getAuthIdentifier for OpenLDAP users returns incorrect value - https://github.com/DirectoryTree/LdapRecord/pull/689{base} DN substitution in DN comparison methods - https://github.com/DirectoryTree/LdapRecord/pull/692isSiblingOf method in DistinguishedName and Model - https://github.com/DirectoryTree/LdapRecord/pull/692Missing return type for Builder::findManyBy() - https://github.com/DirectoryTree/LdapRecord/pull/677
Builder::findManyBy() - https://github.com/DirectoryTree/LdapRecord/pull/677Base DN substitution is now available during creation and rename operations - #632 - #668
Query\Builder::insertAndGetDn method to facilitate base DN substitution during object creation - #668Query\Builder::renameAndGetDn method to facilitate base DN substitution during object rename - #668$errorCode and $errorMessage properties on DetailedError are now properly non-nullable, as they will always be available
$errorCode and $errorMessage properties on DetailedError are now properly non-nullable, as they will always be available
Groups relation Builder TypeError - https://github.com/DirectoryTree/LdapRecord/pull/656 - #655
Invalid query filter when parsing filter containing memberof - @ishanvyas22 - https://github.com/DirectoryTree/LdapRecord/pull/653 - 540f0fb
Changes API to models - https://github.com/DirectoryTree/LdapRecord/pull/647
Add AccountControl trait to ActiveDirectory\Computer model - https://github.com/DirectoryTree/LdapRecord/pull/649 - #648
AccountControl trait to ActiveDirectory\Computer model - https://github.com/DirectoryTree/LdapRecord/pull/649 - #648Unable to set AccountControl object on model's userAccountControl attribute - https://github.com/DirectoryTree/LdapRecord/pull/646 - #645
AccountControl object on model's userAccountControl attribute - https://github.com/DirectoryTree/LdapRecord/pull/646 - #645Remove "errorMessage" from being checked when determining if a response was succesful - cb671ac - #641
Relation::setModelResolver in AppServiceProvider no longer works in v3 - @stevebauman - https://github.com/DirectoryTree/LdapRecord/pull/635
Ensure a string is returned from Query\Builder::prepareWhereValue - https://github.com/DirectoryTree/LdapRecord/commit/10aa78c811a7c33837f4b35b9e84b43
Ensure a string is returned from Query\Builder::prepareWhereValue - https://github.com/DirectoryTree/LdapRecord/commit/10aa78c811a7c33837f4b35b9e84b43fad727e86
Composer version syntax for PSR Simple-Cache - 44e5d90a8cd93b6a2c2251c4c9bd62f2f30eff6b
DirectoryFake::tearDown() will now revert replaced connections with their original instance - 0dcec95d665872c3d55d23d771805c22848ac7c2Fix RDN comparison in model rename function by @Cbrad24 - https://github.com/DirectoryTree/LdapRecord/pull/613
PSR Simple-Cache version constraints - https://github.com/DirectoryTree/LdapRecord/commit/b808497b4e9c3e7fcaee6c7e245ad7a4b0689591
PSR-SimpleCache incompatibility with Laravel 8 - https://github.com/DirectoryTree/LdapRecord/pull/612
Ability to specify a custom cache key in the Query\Builder::cache() method - 4e88fc3aa3b5b1e6fac4a1f9b34d1fccfb54a52c
Query\Builder::cache() method - 4e88fc3aa3b5b1e6fac4a1f9b34d1fccfb54a52cQuery\Builder after retrieving query results - 4e88fc3aa3b5b1e6fac4a1f9b34d1fccfb54a52cHasMany::detachOrDeleteParent() - 88019f17d0ed8f42f87f17223dcfb43e14a49975Return types on LdapRecord\Model\Builder should be fixed to Model where applicable - https://github.com/DirectoryTree/LdapRecord/pull/611
LdapRecord\Model\Builder should be fixed to Model where applicable - https://github.com/DirectoryTree/LdapRecord/pull/611Case insensitive DN comparison by @bonroyage - https://github.com/DirectoryTree/LdapRecord/pull/607
https://ldaprecord.com/docs/core/v3/release-notes
https://ldaprecord.com/docs/core/v3/release-notes
https://ldaprecord.com/docs/core/v3/upgrading
Invalid query filter when parsing filter containing memberof - @ishanvyas22 - https://github.com/DirectoryTree/LdapRecord/pull/653
Case insensitive DN comparison by @bonroyage - https://github.com/DirectoryTree/LdapRecord/pull/608
Revert #506 (user password creation changes) - https://github.com/DirectoryTree/LdapRecord/pull/556
Ensure that the LDAP host is retrieved from a connected connection for cache key generation - @svalgaard - https://github.com/DirectoryTree/LdapRecord
Appropriately handle maximum and minimum values of windows integer time - https://github.com/DirectoryTree/LdapRecord/pull/553
Password::nthash implementation by @OdyX - https://github.com/DirectoryTree/LdapRecord/pull/543
Password::nthash implementation by @OdyX - https://github.com/DirectoryTree/LdapRecord/pull/543HasMany::detachOrDeleteParent() and HasMany::detachAllOrDelete() - https://github.com/DirectoryTree/LdapRecord/pull/547chunk's in isolated connections to allow simultaneous requests in LDAP servers that do not support it - https://github.com/DirectoryTree/LdapRecord/pull/546Laravel 10 support by @truestealth - https://github.com/DirectoryTree/LdapRecord/pull/544
One column per quarter.