LdapRecord-Laravel v4.0.0 Release Notes
We're excited to announce the release of LdapRecord-Laravel v4.0.0! This major version brings compatibility with LdapRecord v4, featuring improved SSL/TLS configuration naming, enhanced query builder internals, and updated testing tools. Please review the following release notes to understand the new features and changes.
Key Features and Changes
LdapRecord v4 Dependency
LdapRecord-Laravel v4 now requires LdapRecord v4 to take advantage of:
- Clearer SSL/TLS configuration naming
- New filter object system
- Improved query builder architecture
- Standardized parameter names
- Better type safety and error handling
Be sure to review the LdapRecord Core v4 upgrade guide for details on breaking changes that may affect your application.
Clearer SSL/TLS Configuration
The SSL/TLS configuration options have been renamed to better reflect their actual functionality:
| Old Name (v3) | New Name (v4) | Purpose |
|---|---|---|
use_ssl / LDAP_SSL | use_tls / LDAP_TLS | LDAPS connection (port 636) |
use_tls / LDAP_TLS | use_starttls / LDAP_STARTTLS | STARTTLS upgrade (port 389) |
This change eliminates confusion between LDAPS (SSL/TLS) and STARTTLS, making your configuration more explicit and easier to understand.
Example configuration update:
// config/ldap.php
'connections' => [
'default' => [
'use_tls' => env('LDAP_TLS', false), // For LDAPS
'use_starttls' => env('LDAP_STARTTLS', false), // For STARTTLS
],
],
Enhanced Directory Emulator
The Directory Emulator has been updated to work seamlessly with LdapRecord v4's new architecture:
- Updated query internals: Now works with the new
LdapRecord\Query\Filterobjects - Parameter rename:
findOrFail()now accepts$selectsinstead of$columns - Model builder updates: Constructor now accepts the model and query instance together
- Array returns: Base query results now return arrays for consistency with v4
Most applications using DirectoryEmulator::setup() should not require changes, as
the public API remains compatible.
EscapedValue Namespace Update
The EscapedValue class has moved from LdapRecord\Models\Attributes\EscapedValue
to LdapRecord\Query\EscapedValue, reflecting its role in query building rather
than model attributes.
The testing UnescapedValue helper has been updated accordingly and will continue
to work without changes in most cases.
Upgrading
For detailed upgrade instructions, please see the upgrade guide.
Most applications will only need to:
- Update their
composer.jsonto require^4.0 - Update SSL/TLS configuration option names
- Review any custom Directory Emulator extensions