Upgrading to Version 2

LdapRecord v2 Core

The core LdapRecord repository has been updated to version 2.

Please visit the upgrade guide to see any changes in the core that may have an impact on your application.

Authentication Events

Authentication events have been moved into a new namespace with a new name, and modified properties.

This action was taken to unify the event structure accross all authentication events.

v1v2
Events\AuthenticatingEvents\Auth\Binding
Events\AuthenticatedEvents\Auth\Bound
Events\AuthenticationFailedEvents\Auth\BindFailed
Events\AuthenticationRejectedEvents\Auth\Rejected
Events\AuthenticatedWithWindowsEvents\Auth\CompletedWithWindows
Events\AuthenticatedModelTrashedEvents\Auth\EloquentUserTrashed
Events\DiscoveredWithCredentialsEvents\Auth\DiscoveredWithCredentials

Import Events

Import events have been moved into a new namespace with a new name, and modified properties.

v1v2
Events\ImportedEvents\Import\Imported
Events\ImportingEvents\Import\Importing
Events\SynchronizedEvents\Import\Synchronized
Events\SynchronizingEvents\Import\Synchronizing
Events\DeletedMissingEvents\Import\DeletedMissing

Attribute Hydrator Changes

Attribute Hydrator classes have been moved into a new namespace.

They have maintained the same API as v1.

v1v2
EloquentHydratorImport\EloquentHydrator
EloquentUserHydratorImport\EloquentUserHydrator
Hydrators\HydratorImport\Hydrators\Hydrator
Hydrators\GuidHydratorImport\Hydrators\GuidHydrator
Hydrators\DomainHydratorImport\Hydrators\DomainHydrator
Hydrators\PasswordHydratorImport\Hydrators\PasswordHydrator
Hydrators\AttributeHydratorImport\Hydrators\AttributeHydrator

LdapImporter Changes

The LdapRecord\Laravel\LdapImporter has been moved and renamed to LdapRecord\Laravel\Import\Synchronizer.

It maintains the same API as v1, with some new public methods for convenience.

LdapUserImporter Changes

The LdapRecord\Laravel\LdapUserImporter has been moved and renamed to LdapRecord\Laravel\Import\UserSynchronizer.

It maintains the same API as v1.

Directory Emulator

When running application tests using the DirectoryEmulator your must now call DirectoryEmulator::tearDown() in PHPUnit's tearDown() method:

protected function tearDown(): void
{
    DirectoryEmulator::teardown();

    parent::tearDown();
}