[PR #12131] Feature: add support for ClassLocator #13504

Open
opened 2026-01-22 16:17:18 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/12131

State: closed
Merged: Yes


In the scope of https://github.com/doctrine/persistence/pull/433 (available from doctrine/persistence >= 4.1) there was added ColocatedMappingDriver::$classLocator (ClassLocator) property, which allows passing any instance of ClassLocator for the mapping driver to use. This commit integrates those changes into AttributeDriver.

Since doctrine/orm maintains the support for doctrine/persistence of older versions, tests ensure that ClassLocator actually exists.

The old paths' behaviour can be adapted into the new by passing FileClassLocator into AttributeDriver (see FileClassLocator::createFromDirectories($directoryPaths)).

The current PR supersedes https://github.com/doctrine/orm/pull/12106 .
There's also a PR for ODM https://github.com/doctrine/mongodb-odm/pull/2802

**Original Pull Request:** https://github.com/doctrine/orm/pull/12131 **State:** closed **Merged:** Yes --- In the scope of https://github.com/doctrine/persistence/pull/433 (available from `doctrine/persistence` >= 4.1) there was added `ColocatedMappingDriver::$classLocator` (`ClassLocator`) property, which allows passing any instance of `ClassLocator` for the mapping driver to use. This commit integrates those changes into `AttributeDriver`. Since `doctrine/orm` maintains the support for `doctrine/persistence` of older versions, tests ensure that `ClassLocator` actually exists. The old paths' behaviour can be adapted into the new by passing `FileClassLocator` into `AttributeDriver` (see `FileClassLocator::createFromDirectories($directoryPaths)`). The current PR supersedes https://github.com/doctrine/orm/pull/12106 . There's also a PR for ODM https://github.com/doctrine/mongodb-odm/pull/2802
admin added the pull-request label 2026-01-22 16:17:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#13504