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_SSLuse_tls / LDAP_TLSLDAPS connection (port 636)
use_tls / LDAP_TLSuse_starttls / LDAP_STARTTLSSTARTTLS 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\Filter objects
  • Parameter rename: findOrFail() now accepts $selects instead 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:

  1. Update their composer.json to require ^4.0
  2. Update SSL/TLS configuration option names
  3. Review any custom Directory Emulator extensions